[GH-ISSUE #2] nvitop command not found after installation #2

Closed
opened 2026-05-05 03:21:14 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @WMRamadan on GitHub (Jul 14, 2021).
Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/2

Runtime Environment

  • Operating system and version: Windows 11 Pro version 21H2 (OS Build 22000.65)
  • Terminal emulator and version: Windows PowerShell 5.1.22000.65
  • Python version: 3.9.6
  • NVML/CUDA version: NVIDIA-SMI 471.21 Driver Version: 471.21 CUDA Version: 11.4
  • nvitop version/commit: 0.3.5.5
  • python-ml-py version: 11.450.51
  • Locale: ENG

Current Behavior

1 - After installing nvitop as instructed you cannot launch nvitop by running nvitop command in Windows Command Prompt or Windows PowerShell. The current solution is to use python -m nvitop command to run.

2 - Running nvitop using "python -m nvitop" produces error "ModuleNotFoundError: No module named '_curses'". The solution is to install windows-curses using pip3 install windows-curses

Expected Behavior

1 - nvitop command should be executable directly from Windows Command Prompt or Windows PowerShell after installation.

2 - pip should install all necessary packages needed for Windows such as windows-curses package.

Context

Unless you are experienced with Python this could be difficult for an average user.

Possible Solutions

1 - Use python -m nvitop to run nvitop or add to PATH

2 - Install windows-curses pip package after installation of nvitop

Steps to reproduce

  1. Install nvitop on Windows and try to run using nvitop command.

  2. After installation run nvitop with python -m nvitop command.

Originally created by @WMRamadan on GitHub (Jul 14, 2021). Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/2 #### Runtime Environment - Operating system and version: Windows 11 Pro version 21H2 (OS Build 22000.65) - Terminal emulator and version: Windows PowerShell 5.1.22000.65 - Python version: 3.9.6 - NVML/CUDA version: NVIDIA-SMI 471.21 Driver Version: 471.21 CUDA Version: 11.4 - `nvitop` version/commit: 0.3.5.5 - `python-ml-py` version: 11.450.51 - Locale: ENG #### Current Behavior 1 - After installing `nvitop` as instructed you cannot launch `nvitop` by running `nvitop` command in Windows Command Prompt or Windows PowerShell. The current solution is to use `python -m nvitop` command to run. 2 - Running nvitop using "python -m nvitop" produces error "ModuleNotFoundError: No module named '_curses'". The solution is to install `windows-curses` using `pip3 install windows-curses` #### Expected Behavior 1 - `nvitop` command should be executable directly from Windows Command Prompt or Windows PowerShell after installation. 2 - pip should install all necessary packages needed for Windows such as `windows-curses` package. #### Context Unless you are experienced with Python this could be difficult for an average user. #### Possible Solutions 1 - Use `python -m nvitop` to run `nvitop` or add to `PATH` 2 - Install `windows-curses` pip package after installation of `nvitop` #### Steps to reproduce 1. Install `nvitop` on Windows and try to run using `nvitop` command. 2. After installation run `nvitop` with `python -m nvitop` command.
gitea-mirror 2026-05-05 03:21:14 -06:00
Author
Owner

@XuehaiPan commented on GitHub (Jul 14, 2021):

Thanks for the feedback!

For the first issue:

  1. nvitop command should be executable directly from Windows Command Prompt or Windows PowerShell after installation.

The Python executable (in PYTHONHOMEDIR) and the scripts installed by pip (in PYTHONHOMEDIR/Scripts) are in the different directories. You should add both the Python home and its script directory to your shell PATH. If you are using conda or virtualenv, these entries will be added to your PATH at activation automatically.

For the second issue:

  1. pip should install all necessary packages needed for Windows such as "windows-curses" package.

I tested and packed nvitop on my Linux machine, and the sys.platform was Linux when I build the wheel file. When you installing nvitop on Windows from PyPI, pip will use the wheel file instead of running the setup.py (which will determine sys.platform at runtime). I will repack the wheel file to PyPI later.

<!-- gh-comment-id:880047647 --> @XuehaiPan commented on GitHub (Jul 14, 2021): Thanks for the feedback! For the first issue: > 1. nvitop command should be executable directly from Windows Command Prompt or Windows PowerShell after installation. The Python executable (in `PYTHONHOMEDIR`) and the scripts installed by `pip` (in `PYTHONHOMEDIR/Scripts`) are in the different directories. You should add both the Python home and its script directory to your shell PATH. If you are using conda or virtualenv, these entries will be added to your PATH at activation automatically. <img src="https://user-images.githubusercontent.com/16078332/125660051-e5971724-3d97-4c8d-bd16-cfbabe93bbaa.png"> For the second issue: > 2. pip should install all necessary packages needed for Windows such as "windows-curses" package. I tested and packed `nvitop` on my Linux machine, and the `sys.platform` was `Linux` when I build the wheel file. When you installing `nvitop` on Windows from PyPI, `pip` will use the wheel file instead of running the `setup.py` (which will determine `sys.platform` at runtime). I will repack the wheel file to PyPI later. <img src="https://user-images.githubusercontent.com/16078332/125660090-dcb0afd4-8710-4eb1-b8a9-1776e21978d7.png">
Author
Owner

@XuehaiPan commented on GitHub (Jul 14, 2021):

I have uploaded the repacked version of nvitop (fixed by b669fa39b1) to the PyPI index, you can try:

pip3 uninstall windows-curses
pip3 install nvitop==0.3.5.6

It should install windows-curses automatically.

<!-- gh-comment-id:880063192 --> @XuehaiPan commented on GitHub (Jul 14, 2021): I have uploaded the repacked version of `nvitop` (fixed by b669fa39b161e7d482221ccee696d8dd82ed8910) to the PyPI index, you can try: ```bash pip3 uninstall windows-curses pip3 install nvitop==0.3.5.6 ``` It should install `windows-curses` automatically.
Author
Owner

@XuehaiPan commented on GitHub (Jul 15, 2021):

Thanks for the feedback from @WMRamadan! Feel free to reopen this issue if you have any other questions.

<!-- gh-comment-id:880632255 --> @XuehaiPan commented on GitHub (Jul 15, 2021): Thanks for the feedback from @WMRamadan! Feel free to reopen this issue if you have any other questions.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/nvitop#2
No description provided.