Registry / data / watermark

watermark

JSON →
library2.6.0pypypi✓ verified 85d ago

An IPython magic function to print date/time stamps, system information (e.g., Python version, OS, hardware), GPU details, and package versions. Current version: 2.6.0. Release cadence: irregular, ~1-2 releases per year.

pip install watermark
INSTALL
IMPORT
SIG · WATERMARK
W
watermark
datapythonv2.6.0
Install
5.4s avg
Import
1722ms
Disk
76MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.766s · 80.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.4s · import 1.678s · 81MB
76MB installed
● package 76MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

watermark
from watermark import watermark
watermark() function is separate from the IPython magic; available since v2.2.0

Prints Python version, machine info, package versions, and GPU info.

# In a Jupyter/IPython notebook cell: %watermark -v -m -p numpy,scipy --gpu # Or in a regular Python script: from watermark import watermark print(watermark())
Debug
Known issues
breakingThe `watermark()` function (non-magic) was added in v2.2.0. Importing `watermark` from the package returns the function, not the magic. The magic %watermark still works in IPython.
fix
Use `from watermark import watermark` and call `watermark()` in scripts; for IPython magic, use `%watermark` as before.
affects: >=2.2.0
deprecatedThe `--gpu` flag requires `py3nvml` (optional). If not installed, watermark will ignore the flag without error.
fix
Install py3nvml if GPU information is needed: `pip install py3nvml`.
affects: >=2.4.0
gotchaThe `-p` flag expects package names, not import names. For example, use `-p scikit-learn`, not `-p sklearn`.
fix
Use the correct distribution name (e.g., scikit-learn) rather than the import module name.
affects: all
gotchaLibrary version detection uses `pkg_resources` or `importlib.metadata`. If a package is installed in development mode (pip install -e), the version may be `0.0.0` or missing.
fix
Ensure packages are properly installed; avoid editable installs for version detection.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'watermark'
watermark is not installed.
fix
Install with: pip install watermark
UsageError: %watermark is not a valid IPython magic function.
The watermark magic is not loaded; you may have forgotten to load the extension or run in an environment without IPython.
fix
In IPython/Jupyter, run: %load_ext watermark
KeyError: 'pkg_resources'
setuptools/pkg_resources is missing in the environment.
fix
Install setuptools: pip install setuptools
TypeError: watermark() takes 0 positional arguments but 1 was given
Attempting to call the magic function as a Python function with arguments incorrectly.
fix
Use the `watermark()` function from the module with appropriate keyword arguments, e.g., watermark(packages='numpy').
Upgrade
Version history
2.6.0latest on PyPI · released Dec 21, 2025
Audit
Dependencies
ipythonrequiredRequired for %watermark magic command in Jupyter/IPython
py3nvmloptionalOptional dependency for GPU info (--gpu flag)
Agent activity
37 hits · last 30 days
node
34
OpenAI (training)
1
Resources
watermark — pip install watermark · libregistry