GPUtil is a Python module designed to query the status of NVIDIA GPUs using the `nvidia-smi` command-line utility. It provides access to metrics like GPU load, memory usage, temperature, and UUID. The current version is 1.4.0, and releases occur intermittently, focusing on bug fixes, expanded platform support (e.g., Windows), and new features.
pip install GPUtilVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import GPUtil and retrieve information for all available NVIDIA GPUs. It iterates through each GPU, printing key metrics like name, load, memory usage, temperature, and UUID. It includes basic error handling for when `nvidia-smi` is not found.
Update your import statements from `import GPUstats` to `import GPUtil` and adjust any module-specific references accordingly. Ensure your `pip install` command is `pip install GPUtil`.
Install the appropriate NVIDIA display drivers for your GPU. Verify `nvidia-smi` is callable from your terminal. If not, add its installation directory (e.g., `C:\Program Files\NVIDIA Corporation\NVSMI` on Windows or `/usr/bin` on Linux) to your system's PATH.
Upgrade to GPUtil version 1.4.0 or newer to access GPU temperature information and improved compatibility on Windows: `pip install --upgrade GPUtil`.
If using Python 2.x, ensure you are on GPUtil version 1.2.3 or newer. Alternatively, upgrade to Python 3.x, where this issue was not present.
No dependency data recorded yet.