[GH-ISSUE #154] [BUG] _curses module not found #98

Closed
opened 2026-05-05 03:25:24 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @sciarrilli on GitHub (Mar 18, 2025).
Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/154

Originally assigned to: @XuehaiPan on GitHub.

Required prerequisites

  • I have read the documentation https://nvitop.readthedocs.io.
  • I have searched the Issue Tracker that this hasn't already been reported. (comment there if it has.)
  • I have tried the latest version of nvitop in a new isolated virtual environment.

What version of nvitop are you using?

1.4.2

Operating system and version

Ubuntu 22.04

NVIDIA driver version

570.86.15

NVIDIA-SMI

Tue Mar 18 01:09:02 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.86.15              Driver Version: 570.86.15      CUDA Version: 12.8     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA A100-SXM4-40GB          On  |   00000000:10:1C.0 Off |                    0 |
| N/A   28C    P0             50W /  400W |       1MiB /  40960MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
|   1  NVIDIA A100-SXM4-40GB          On  |   00000000:10:1D.0 Off |                    0 |
| N/A   28C    P0             51W /  400W |       1MiB /  40960MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
|   2  NVIDIA A100-SXM4-40GB          On  |   00000000:20:1C.0 Off |                    0 |
| N/A   27C    P0             55W /  400W |       1MiB /  40960MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
|   3  NVIDIA A100-SXM4-40GB          On  |   00000000:20:1D.0 Off |                    0 |
| N/A   28C    P0             55W /  400W |       1MiB /  40960MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
|   4  NVIDIA A100-SXM4-40GB          On  |   00000000:90:1C.0 Off |                    0 |
| N/A   27C    P0             53W /  400W |       1MiB /  40960MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
|   5  NVIDIA A100-SXM4-40GB          On  |   00000000:90:1D.0 Off |                    0 |
| N/A   27C    P0             54W /  400W |       1MiB /  40960MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
|   6  NVIDIA A100-SXM4-40GB          On  |   00000000:A0:1C.0 Off |                    0 |
| N/A   28C    P0             52W /  400W |       1MiB /  40960MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
|   7  NVIDIA A100-SXM4-40GB          On  |   00000000:A0:1D.0 Off |                    0 |
| N/A   28C    P0             54W /  400W |       1MiB /  40960MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+

Python environment

Python 3.12.6

Problem description

nvitop will not start

Steps to Reproduce

The Python snippets (if any):

nvitop

Command lines:


Traceback

Traceback (most recent call last):
  File "/opt/pytorch/bin/nvitop", line 5, in <module>
    from nvitop.cli import main
  File "/opt/pytorch/lib/python3.12/site-packages/nvitop/cli.py", line 7, in <module>
    import curses
  File "/usr/local/lib/python3.12/curses/__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'

Logs

Traceback (most recent call last):
  File "/opt/pytorch/bin/nvitop", line 5, in <module>
    from nvitop.cli import main
  File "/opt/pytorch/lib/python3.12/site-packages/nvitop/cli.py", line 7, in <module>
    import curses
  File "/usr/local/lib/python3.12/curses/__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'

Expected behavior

beautiful graphs of nvidia gpu's melting

Additional context

No response

Originally created by @sciarrilli on GitHub (Mar 18, 2025). Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/154 Originally assigned to: @XuehaiPan on GitHub. ### Required prerequisites - [x] I have read the documentation <https://nvitop.readthedocs.io>. - [x] I have searched the [Issue Tracker](https://github.com/XuehaiPan/nvitop/issues) that this hasn't already been reported. (comment there if it has.) - [x] I have tried the latest version of nvitop in a new isolated virtual environment. ### What version of nvitop are you using? 1.4.2 ### Operating system and version Ubuntu 22.04 ### NVIDIA driver version 570.86.15 ### NVIDIA-SMI ```text Tue Mar 18 01:09:02 2025 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 570.86.15 Driver Version: 570.86.15 CUDA Version: 12.8 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA A100-SXM4-40GB On | 00000000:10:1C.0 Off | 0 | | N/A 28C P0 50W / 400W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ | 1 NVIDIA A100-SXM4-40GB On | 00000000:10:1D.0 Off | 0 | | N/A 28C P0 51W / 400W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ | 2 NVIDIA A100-SXM4-40GB On | 00000000:20:1C.0 Off | 0 | | N/A 27C P0 55W / 400W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ | 3 NVIDIA A100-SXM4-40GB On | 00000000:20:1D.0 Off | 0 | | N/A 28C P0 55W / 400W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ | 4 NVIDIA A100-SXM4-40GB On | 00000000:90:1C.0 Off | 0 | | N/A 27C P0 53W / 400W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ | 5 NVIDIA A100-SXM4-40GB On | 00000000:90:1D.0 Off | 0 | | N/A 27C P0 54W / 400W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ | 6 NVIDIA A100-SXM4-40GB On | 00000000:A0:1C.0 Off | 0 | | N/A 28C P0 52W / 400W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ | 7 NVIDIA A100-SXM4-40GB On | 00000000:A0:1D.0 Off | 0 | | N/A 28C P0 54W / 400W | 1MiB / 40960MiB | 0% Default | | | | Disabled | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | No running processes found | +-----------------------------------------------------------------------------------------+ ``` ### Python environment Python 3.12.6 ### Problem description nvitop will not start ### Steps to Reproduce The Python snippets (if any): ```python nvitop ``` Command lines: ```bash ``` ### Traceback ```pytb Traceback (most recent call last): File "/opt/pytorch/bin/nvitop", line 5, in <module> from nvitop.cli import main File "/opt/pytorch/lib/python3.12/site-packages/nvitop/cli.py", line 7, in <module> import curses File "/usr/local/lib/python3.12/curses/__init__.py", line 13, in <module> from _curses import * ModuleNotFoundError: No module named '_curses' ``` ### Logs ```text Traceback (most recent call last): File "/opt/pytorch/bin/nvitop", line 5, in <module> from nvitop.cli import main File "/opt/pytorch/lib/python3.12/site-packages/nvitop/cli.py", line 7, in <module> import curses File "/usr/local/lib/python3.12/curses/__init__.py", line 13, in <module> from _curses import * ModuleNotFoundError: No module named '_curses' ``` ### Expected behavior beautiful graphs of nvidia gpu's melting ### Additional context _No response_
gitea-mirror 2026-05-05 03:25:24 -06:00
Author
Owner

@XuehaiPan commented on GitHub (Mar 18, 2025):

Hi @sciarrilli, curses is a builtin module for Python on Unix. The log looks like you are using a conda environment. Your Python interpreter might miss some requirements. Could you try:

/usr/bin/pip3 install --user uv
~/.local/bin/uvx nvitop
<!-- gh-comment-id:2731961933 --> @XuehaiPan commented on GitHub (Mar 18, 2025): Hi @sciarrilli, `curses` is a builtin module for Python on Unix. The log looks like you are using a `conda` environment. Your Python interpreter might miss some requirements. Could you try: ```bash /usr/bin/pip3 install --user uv ~/.local/bin/uvx nvitop ```
Author
Owner

@sciarrilli commented on GitHub (Mar 18, 2025):

Thank you @XuehaiPan I resolved the issue. In the conda env I cannot do pip3 install --user. But I was able to use nvitop outside of the conda env I was working in.

<!-- gh-comment-id:2732015055 --> @sciarrilli commented on GitHub (Mar 18, 2025): Thank you @XuehaiPan I resolved the issue. In the conda env I cannot do pip3 install --user. But I was able to use nvitop outside of the conda env I was working in.
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#98
No description provided.