Back to main.

Calmcode Shorts

watermark.py logowatermark.py

When you make a GitHub issue, it usually helps to not only share the error message but also to send machine information along. It might be that your python version or your operating system are causing a bug and you'd really save the maintainer some time if you also mention this information.

To make it easy to collect this information from a jupyter notebook you can check out watermark. You can install it via pip.

pip install watermark

Once it is installed you need to load the command in jupyter.

%load_ext watermark

Once it's loaded you can run it. To view all available commands, you need to run:

%watermark?

It's recommended to customise the watermark command because that way you can also send along the version number of any relevant packages. Here's the command used in the video.

%watermark --machine --python --packages numpy,pandas,scikit-learn

Back to main.