Skip to main content

A (user-)friendly wrapper to nvidia-smi

Project description


A (user-)friendly wrapper to nvidia-smi.

It can be used to filter the GPUs based on resource usage (e.g. to choose the least utilized GPU on a multi-GPU system).



nvsmi --help
nvsmi ls --help
nvsmi ps --help

As a library

import nvsmi



  • An nvidia GPU
  • nvidia-smi
  • Python 2.7 or 3.6+



The recommended installation method is pipx. More specifically, you can install nvsmi for your user with:

pipx install nvsmi

The above command will create a virtual environment in ~/.local/pipx/venvs/nvsmi and add the nvsmi executable in ~/.local/bin.


Alternatively you can use good old pip but this is more fragile than pipx:

pip install --user nvsmi

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nvsmi, version 0.4.2
Filename, size File type Python version Upload date Hashes
Filename, size nvsmi-0.4.2-py3-none-any.whl (5.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size nvsmi-0.4.2.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page