Closed slacklife closed 11 months ago
It works in normal shell. However, it fails in tmux 3.1 environment. It report
ERROR: Failed to initialize `curses` (curs_set() returned ERR)
It only differs when using tmux or not.
Hi @slacklife, can you try to set:
set -g default-terminal "tmux-256color"
set -g utf8 on
in your tmux.conf
? Then you need to reload your tmux configuration.
Thanks for your comment, but it didn't work.
set -g utf8 on
is for an old version of tmux. They were set in a way so they don't error in newer versions. Please refer to here
set -g default-terminal "tmux-256color"
is my default setting in my .tmux.conf
Are there any other solutions to solve my problem?
@slacklife Do you set your TERM
environment variable correctly in your tmux shell? For example:
export TERM="xterm-256color"
export LC_ALL="en_US.UTF-8"
It works magically! Many thanks! Nvitop is a great tool!
It works magically!
Glad to hear that. You could put these in your shell profile (e.g., ~/.bashrc
, ~/.zshrc
) to automatically set these variables on startup.
export TERM="xterm-256color"
export LC_ALL="en_US.UTF-8"
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