Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvitop command not found after installation #2

Closed
WMRamadan opened this issue Jul 14, 2021 · 3 comments
Closed

nvitop command not found after installation #2

WMRamadan opened this issue Jul 14, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@WMRamadan
Copy link

WMRamadan commented Jul 14, 2021

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.

@XuehaiPan
Copy link
Owner

XuehaiPan commented 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.

@XuehaiPan
Copy link
Owner

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

pip3 uninstall windows-curses
pip3 install nvitop==0.3.5.6

It should install windows-curses automatically.

@XuehaiPan XuehaiPan added enhancement New feature or request question Further information is requested documentation Improvements or additions to documentation and removed question Further information is requested labels Jul 15, 2021
@XuehaiPan
Copy link
Owner

XuehaiPan commented Jul 15, 2021

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

@XuehaiPan XuehaiPan changed the title Problems running nvitop on Windows after installation nvitop command not found after installation Oct 13, 2021
@XuehaiPan XuehaiPan pinned this issue Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants