nvidia-ml-py
Python Bindings for the NVIDIA Management Library
Decision gist · record as of 2026-08-14
Yes. This is a stable, dependency-free wrapper to a critical system library with no known vulnerabilities, active maintenance, and broad adoption (top 5000 PyPI packages). Install it if you need to query or monitor NVIDIA GPUs from Python; the only blocker is requiring NVIDIA drivers and NVML on the target system.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires NVIDIA GPU drivers and NVML library installed on the system; will fail if neither is present.
- Low friction installation as a pure wheel with no runtime dependencies.
- Actively maintained with a release 74 days ago and production-stable status.
License · maintenance · safety
BSD (permissive) — BSD permissive license allows commercial and private use with minimal restrictions—retain copyright notice and disclaimer in redistributions.
last release 2026-06-01 (74 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 21,045,134 downloads/mo, #1,015 on PyPI
Alternatives
Verify before relying
pip install nvidia-ml-py
from nvidia_ml_py import *
nvmlInit()
deviceCount = nvmlDeviceGetCount()
for i in range(deviceCount):
handle = nvmlDeviceGetHandleByIndex(i)
print(nvmlDeviceGetName(handle))
nvmlShutdown()- Exact Python version support (documentation mentions 2.5+ with ctypes, but requires_python is unspecified)
- Whether ctypes is available in all target Python environments
- Compatibility with non-NVIDIA GPUs or virtualized GPU environments
What it is and what it does
nvidia-ml-py is a ctypes-based wrapper that translates NVIDIA's C Management Library (NVML) into Python methods and classes. It handles struct allocation, pointer passing, and converts NVML error codes into Python exceptions, making GPU queries and monitoring accessible from Python without direct C bindings.
The library exposes the NVML API surface—driver version queries, device enumeration, memory info, temperature, power state, and other hardware metrics. It converts C output parameters into Python return values and C structs into Python objects with named attributes. Since its first release in 2012, it has tracked NVML versions through version 13.580, supporting both Python 2 and Python 3 syntax.
Use it for
- Query GPU memory usage and availability for resource allocation in ML training or inference pipelines.
- Monitor driver version and GPU device names at application startup for compatibility checks.
- Build system monitoring dashboards that poll GPU temperature, power draw, or utilization metrics.
- Validate GPU availability and count before launching GPU-accelerated workloads.
- Implement health checks in containerized environments to detect GPU driver or hardware failures.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a stable, dependency-free wrapper to a critical system library with no known vulnerabilities, active maintenance, and broad adoption (top 5000 PyPI packages). Install it if you need to query or monitor NVIDIA GPUs from Python; the only blocker is requiring NVIDIA drivers and NVML on the target system.
Install
nvidia-ml-py on PyPI
Before you install
Low friction installation as a pure wheel with no runtime dependencies. Actively maintained with a release 74 days ago and production-stable status.
Requires NVIDIA GPU drivers and NVML library installed on the system; will fail if neither is present.
License in practice
BSD permissive license allows commercial and private use with minimal restrictions—retain copyright notice and disclaimer in redistributions.
Quickstart
pip install nvidia-ml-py
from nvidia_ml_py import *
nvmlInit()
deviceCount = nvmlDeviceGetCount()
for i in range(deviceCount):
handle = nvmlDeviceGetHandleByIndex(i)
print(nvmlDeviceGetName(handle))
nvmlShutdown()
Verify before relying
- Exact Python version support (documentation mentions 2.5+ with ctypes, but requires_python is unspecified)
- Whether ctypes is available in all target Python environments
- Compatibility with non-NVIDIA GPUs or virtualized GPU environments
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 74 days since the last release |
| First released | |
| Downloads | 21,045,134 / month, #1,015 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: HardwareTopic :: System :: Systems Administration |
Evidence: nvidia_ml_py-13.610.43-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “nvidia driver version check”
- nvidia-ml-pyPython wrapper around NVIDIA's Management Library that exposes GPU…
- nvidia-ml-py3Provides Python bindings to NVIDIA's Management Library (NVML) for…
- py3nvmlProvides Python 3 bindings to query NVIDIA GPU state and manage GPU…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also nvidia-ml-py3 · pynvml · py3nvml · nvitop · pycuda · gpustat · cuda-python · cufile-python · nccl4py · nvidia-nvvm