nvidia-ml-py3
Python Bindings for the NVIDIA Management Library
What it is and what it does
nvidia-ml-py3 is a ctypes-based wrapper around NVIDIA's Management Library that exposes GPU monitoring and management functions to Python. It allows you to query device properties, memory usage, driver versions, and other GPU state without calling external commands. The package converts NVML C structs and function signatures into Python classes and methods, handling string buffers and error codes automatically.
The package has been unmaintained since 2017-06-03 and carries no runtime dependencies—it relies entirely on the system's NVML C library being present. While it is marked Production/Stable and carries a permissive BSD license, its age and lack of maintenance mean it may not work reliably with modern Python versions, recent NVIDIA drivers, or current NVML library versions without manual fixes.
Use it for:
- Monitor GPU memory usage and availability on systems running NVIDIA GPUs for resource allocation decisions.
- Query driver version and GPU device names at startup to validate hardware configuration in GPU-accelerated applications.
- Build system administration tools that report GPU health and utilization without spawning external processes.
- Detect the number and type of available GPUs to automatically configure multi-GPU workloads.
- Log GPU state changes during long-running compute jobs for debugging and performance analysis.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python bindings to NVIDIA's Management Library (NVML) for querying and monitoring GPU devices, including memory usage, driver version, and device information.
No. The package is abandoned (last release 2017-06-03) with no maintenance signal. While it has no known vulnerabilities and carries a permissive license, the high install friction combined with zero maintenance makes it a poor choice for new projects. Consider maintained alternatives or direct NVML bindings if you need GPU monitoring on modern systems.
Install
nvidia-ml-py3 on PyPI
pip
pip install nvidia-ml-py3uv
uv add nvidia-ml-py3poetry
poetry add nvidia-ml-py3Installing nvidia-ml-py3
Before you install
High install friction: the package has been abandoned since its last release on 2017-06-03 with no maintenance activity. Installation requires the NVML C library to be present on the system, and the package itself carries no runtime dependencies to help bridge that gap.
License in practice
BSD license (permissive) places no restrictions on use, modification, or redistribution in proprietary or open-source contexts.
Quickstart
pip install nvidia-ml-py3
from nvidia_ml_py3 import *
nvmlInit()
deviceCount = nvmlDeviceGetCount()
for i in range(deviceCount):
handle = nvmlDeviceGetHandleByIndex(i)
info = nvmlDeviceGetMemoryInfo(handle)
print(f"Device {i} free memory: {info.free}")
nvmlShutdown()
Requires the NVIDIA Management Library (NVML) C library to be installed on the system; NVIDIA GPU drivers must be present and properly configured.
Verify before relying
- Whether the package actually works with modern Python versions despite being abandoned since 2017-06-03.
- Current compatibility with recent NVIDIA driver versions and NVML library versions.
- Whether ctypes-based bindings remain functional across different operating systems without maintenance.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,359 days since the last release |
| First released | |
| Downloads | 481,423/month — #6,428 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: nvidia-ml-py3-7.352.0.tar.gz
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
nvidia-ml-pyPython wrapper around NVIDIA's Management…
permissive · top 5,000 on PyPI
py3nvmlProvides Python 3 bindings to query NVIDIA GPU…
permissive · top 15,000 on PyPI
gpustatDisplays real-time NVIDIA GPU status, memory…
permissive · top 5,000 on PyPI
nvitopInteractive terminal-based viewer for NVIDIA…
copyleft · top 15,000 on PyPI
pycudaPyCUDA provides Pythonic bindings to Nvidia's…
permissive · top 15,000 on PyPI
GPUtilGPUtil queries NVIDIA GPU status and…
permissive · top 15,000 on PyPI
cuda-pythoncuda-python is a metapackage providing Pythonic…
unclear · top 5,000 on PyPI
cupti-pythonProvides Python bindings to NVIDIA's CUPTI…
unclear · top 15,000 on PyPI
nccl4pynccl4py provides Python bindings to NVIDIA's…
permissive · top 15,000 on PyPI