mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 14:15:55 -06:00
[GH-ISSUE #97] [BUG] ERROR: Failed to initialize curses (curs_set() returned ERR) in tmux environment #58
Labels
No labels
api
bug
bug
cli / tui
dependencies
documentation
documentation
documentation
duplicate
enhancement
exporter
invalid
pull-request
pynvml
question
question
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/nvitop#58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @slacklife on GitHub (Sep 22, 2023).
Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/97
Originally assigned to: @XuehaiPan on GitHub.
Required prerequisites
What version of nvitop are you using?
1.3.0
Operating system and version
Ubuntu 18.04.5 LTS
NVIDIA driver version
470.103.01
NVIDIA-SMI
Python environment
gpustat==1.1.1
nvidia-cublas-cu11==11.10.3.66
nvidia-cuda-cupti-cu11==11.7.101
nvidia-cuda-nvrtc-cu11==11.7.99
nvidia-cuda-runtime-cu11==11.7.99
nvidia-cudnn-cu11==8.5.0.96
nvidia-cufft-cu11==10.9.0.58
nvidia-curand-cu11==10.2.10.91
nvidia-cusolver-cu11==11.4.0.1
nvidia-cusparse-cu11==11.7.4.91
nvidia-htop==1.0.5
nvidia-ml-py==12.535.108
nvidia-nccl-cu11==2.14.3
nvidia-nvtx-cu11==11.7.91
py3nvml==0.2.7
Problem description
It works in normal shell.
However, it fails in tmux 3.1 environment.
It report
ERROR: Failed to initialize `curses` (curs_set() returned ERR)I have tried the solution here.
But it produced the same issue, no matter in the conda environment or not.
It only differs when using tmux or not.
Steps to Reproduce
The Python snippets (if any):
Command lines:
Traceback
No response
Logs
No response
Expected behavior
No response
Additional context
No response
@XuehaiPan commented on GitHub (Sep 22, 2023):
Hi @slacklife, can you try to set:
in your
tmux.conf? Then you need to reload your tmux configuration.@slacklife commented on GitHub (Sep 22, 2023):
Thanks for your comment, but it didn't work.
set -g utf8 onis for an old version of tmux. They were set in a way so they don't error in newer versions. Please refer to hereset -g default-terminal "tmux-256color"is my default setting in my .tmux.confAre there any other solutions to solve my problem?
@XuehaiPan commented on GitHub (Sep 22, 2023):
@slacklife Do you set your
TERMenvironment variable correctly in your tmux shell? For example:@slacklife commented on GitHub (Sep 22, 2023):
It works magically! Many thanks!
Nvitop is a great tool!
@XuehaiPan commented on GitHub (Sep 22, 2023):
Glad to hear that. You could put these in your shell profile (e.g.,
~/.bashrc,~/.zshrc) to automatically set these variables on startup.