GPUtil
GPUtil is a Python module for getting the GPU status from NVIDA GPUs using nvidia-smi.
What it is and what it does
GPUtil is a thin Python wrapper around nvidia-smi that detects available NVIDIA GPUs and ranks them by current load and memory consumption. It was designed to help deep learning frameworks automatically select idle GPUs, but works for any task needing GPU availability data. The module has no external dependencies beyond Python's standard library, making it lightweight to install—but it only works on systems with NVIDIA hardware and drivers installed.
The package provides two main functions: getAvailable() returns a filtered, ordered list of GPU device IDs based on load and memory thresholds, and getFirstAvailable() blocks until a GPU meeting those criteria becomes available, with configurable retry logic. It also includes utility functions to display current GPU status. Since its last release in 2018, the package has not been updated despite ongoing repository activity, which may affect compatibility with newer NVIDIA driver versions or Python releases.
Use it for:
- Automatically select an idle GPU before launching a deep learning training job to avoid resource conflicts.
- Monitor GPU utilization in a separate thread and log or alert when specific GPUs exceed load or memory thresholds.
- Implement a queue system that waits for a GPU to become available before starting a compute task, with configurable retry intervals.
- Rank multiple GPUs by current memory usage to assign workloads to the least-loaded device.
- Exclude specific GPUs from selection (by ID or UUID) to reserve them for other processes or tasks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
GPUtil queries NVIDIA GPU status and availability by wrapping nvidia-smi, returning ordered lists of GPUs filtered by current load and memory usage.
Yes, if you have NVIDIA hardware and need lightweight GPU availability detection. The package is stable, has no external dependencies, and works well for its narrow purpose. However, be cautious: it has not been updated since 2018, so compatibility with very recent NVIDIA drivers or Python versions is unverified. For production systems or modern deep learning frameworks, verify first that it works with your specific CUDA and driver versions.
Install
gputil on PyPI
pip
pip install gputiluv
uv add gputilpoetry
poetry add gputilInstalling GPUtil
Before you install
No runtime dependencies beyond Python standard library, but requires an NVIDIA GPU with nvidia-smi installed on the system. Package has been inactive since 2018 (latest release 2018-12-18) despite recent repository activity, which may indicate maintenance gaps for newer CUDA/driver versions.
License in practice
MIT license is permissive; you can use, modify, and distribute GPUtil with minimal restrictions, provided you retain the license notice.
Quickstart
pip install gputil
import GPUtil
deviceIDs = GPUtil.getAvailable(order='first', limit=1, maxLoad=0.5, maxMemory=0.5)
print(deviceIDs)
Requires NVIDIA GPU with nvidia-smi installed and accessible in PATH; will fail on non-NVIDIA systems or without proper NVIDIA drivers.
Verify before relying
- Compatibility with modern CUDA versions and recent NVIDIA driver releases (last package release was 2018).
- Whether the package works reliably on current Python versions beyond 3.5 (tested version noted in description).
- Support status for multi-GPU selection patterns in contemporary deep learning frameworks.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | actively maintained — 2,796 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 742,526/month — #5,180 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: GPUtil-1.4.0.tar.gz
Keywords: gpu, utilization, load, memory, available, usage, free, select, nvidia
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
gpustatDisplays real-time NVIDIA GPU status, memory…
permissive · top 5,000 on PyPI
nvgpuQueries and monitors NVIDIA GPUs on a machine,…
permissive · top 15,000 on PyPI
py3nvmlProvides Python 3 bindings to query NVIDIA GPU…
permissive · top 15,000 on PyPI
nvitopInteractive terminal-based viewer for NVIDIA…
copyleft · top 15,000 on PyPI
egl-probeDetects and enumerates available graphics…
unclear · top 15,000 on PyPI
pyrsmiProvides Python bindings to monitor and manage…
permissive · top 15,000 on PyPI
nvidia-ml-py3Provides Python bindings to NVIDIA's Management…
permissive · top 15,000 on PyPI
nvidia-nvvmProvides the NVVM compiler IR library for…
unclear · top 5,000 on PyPI
cuvs-cu12Provides GPU-accelerated approximate nearest…
permissive · top 15,000 on PyPI
nvidia-curandProvides NVIDIA CURAND native runtime libraries…
unclear · top 1,000 on PyPI