Comments (11)
I can reproduce this inside a CentOS 7 docker container.
from nvitop.
@yinrong Could you try to set LC_ALL
before running nvitop
? E.g.:
export LC_ALL='C.UTF-8'
nvitop
There is a similar issue #3.
And do you have libncursesw
(with w
suffix for wide char) installed on your machine? Have a quick check.
from nvitop.
@yinrong Any updates? nvitop
requires to set LC_ALL
to UTF-8
with libncursesw
installed. If you don't have the permission to install libncursesw
, you can try:
nvitop -U
from nvitop.
none above is working. I tried.
LC_ALL='C.UTF-8' nvitop -m
LC_ALL='C.UTF-8' nvitop -m -U
yum install ncurses-devel
LC_ALL='C.UTF-8' nvitop -m
LC_ALL='C.UTF-8' nvitop -m -U
from nvitop.
@yinrong nvitop -U
only uses ASCII characters, that may work. Maybe your Python is not compiled with NCursesW library. Or you are using nvitop
in a conda
environment. But I'm not really sure.
Please provide more details of your runtime environment. Then we can investigate deeper.
- Terminal emulator and version: [e.g. GNOME Terminal 3.36.2 / Windows Terminal 1.8.1521.0]
- Python version: [e.g.
3.5.6
/3.9.6
]
head -1 "$(which nvitop)" | cut -b3-
PYTHON3="$(head -1 "$(which nvitop)" | cut -b3-)"
"${PYTHON3}" -V # use the python executable you run `pip3 install nvitop` with
EDIT: detect Python interpreter from shebang.
- Python compile options:
# use the python executable you run `pip3 install nvitop` with
"${PYTHON3}" -c 'import sysconfig; [print(k, v) for k, v in sysconfig.get_config_vars().items()]' | grep -i 'curses'
"${PYTHON3}" -c 'import sysconfig; [print(k, v) for k, v in sysconfig.get_config_vars().items()]'
Please paste the output with text in the comment below (not screenshot).
- NCurses and NCursesW version and location:
locate libncursesw.so
nvitop
version or commit: [e.g.0.3.5.6
/main@b669fa3
]
nvitop -V
- Locale: [e.g.
C
/C.UTF-8
/en_US.UTF-8
]
locale
from nvitop.
same problem
- macos BigSur terminal:iterm2
- Python 3.9.7
- locate libncursesw.so
/data/app/anaconda3/envs/faq-latest/lib/libncursesw.so
/data/app/anaconda3/envs/faq-latest/lib/libncursesw.so.6
/data/app/anaconda3/envs/faq-latest/lib/libncursesw.so.6.3
python3 -c 'import sysconfig; [print(k, v) for k, v in sysconfig.get_config_vars().items()]' | grep -i 'curses'
HAVE_CURSES_FILTER 1
HAVE_CURSES_H 1
HAVE_CURSES_HAS_KEY 1
HAVE_CURSES_IMMEDOK 1
HAVE_CURSES_IS_PAD 1
HAVE_CURSES_IS_TERM_RESIZED 1
HAVE_CURSES_RESIZETERM 1
HAVE_CURSES_RESIZE_TERM 1
HAVE_CURSES_SYNCOK 1
HAVE_CURSES_TYPEAHEAD 1
HAVE_CURSES_USE_ENV 1
HAVE_CURSES_WCHGAT 1
HAVE_NCURSES_H 1
STRICT_SYSV_CURSES /* Don't use ncurses extensions */
- nvitop version: 0.5.4
- locale
LANG=en_US.utf-8
LC_CTYPE="en_US.utf-8"
LC_NUMERIC="en_US.utf-8"
LC_TIME="en_US.utf-8"
LC_COLLATE="en_US.utf-8"
LC_MONETARY="en_US.utf-8"
LC_MESSAGES="en_US.utf-8"
LC_PAPER="en_US.utf-8"
LC_NAME="en_US.utf-8"
LC_ADDRESS="en_US.utf-8"
LC_TELEPHONE="en_US.utf-8"
LC_MEASUREMENT="en_US.utf-8"
LC_IDENTIFICATION="en_US.utf-8"
LC_ALL=en_US.utf-8
from nvitop.
$ locate libncursesw.so /data/app/anaconda3/envs/faq-latest/lib/libncursesw.so /data/app/anaconda3/envs/faq-latest/lib/libncursesw.so.6 /data/app/anaconda3/envs/faq-latest/lib/libncursesw.so.6.3
@muzhi1991 As we can see, you are using libncurses
installed in conda environment rather than the system's one (under /usr/lib
). What's the result for:
head -1 "$(which nvitop)"
Have you set the correct LD_LIBRARY_PATH
? Try:
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}"
nvitop
Alternatively, you can try:
/usr/bin/python3 -m pip install --user nvitop
and then run
~/.local/bin/nvitop
from nvitop.
head -1 "$(which nvitop)"
outputs, use conda env python.
#!/data/app/anaconda3/envs/faq-latest/bin/python
then
run LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}" nvitop
same result.
from nvitop.
@yinrong @muzhi1991 I create a bug fix PR in #15. You try the fix with:
pip3 install git+https://github.com/XuehaiPan/nvitop.git@fix-locale-utf8#egg=nvitop
Let me know if it works for you.
from nvitop.
it works! thank you!
from nvitop.
Thanks for the feedback from @yinrong @muzhi1991! Now the fix is included in tag 0.5.5
and has been pushed to PyPI.
from nvitop.
Related Issues (20)
- [Feature Request] Add shortcut that shows parent process's name for selected process HOT 1
- [Question] Memory bandwidth utilization of GPUs? HOT 4
- [BUG] Monitor mode displays nothing under Python 3.12 in Windows 11 HOT 8
- [Feature Request] It is recommended to change the dependency from nvidia-ml-py to pynvml HOT 1
- [BUG][exporter] Process metrics still exist when the process is gone HOT 5
- [BUG] curser error init display on ubuntu 22.10 HOT 1
- [Question] How to log GPU performance to `wandb` HOT 2
- [Feature Request] add io stat for disk and process like glances HOT 2
- [BUG] Pytorch lightning callback HOT 3
- [Feature Request] Show real-time bandwidth under monitor mode
- [Question] ERROR: Failed to initialize `curses` (setupterm: could not find terminfo database) HOT 4
- [Question] How snapshot could be used HOT 2
- Installation: which step to follow? HOT 1
- [BUG] Prometheus connection refused HOT 4
- [Question] Grafana Dashboard Example HOT 1
- [Feature Request] can you support word wrap for COMMAND information HOT 1
- [Question] How to count the total amount of one user's GPU memory on all graphics cards by using nvitop? HOT 2
- [BUG] ERROR: Failed to initialize `curses` (curs_set() returned ERR) in tmux environment HOT 5
- [BUG] Display issue when running in Docker environment HOT 5
- [BUG] `nvitop.Device.from_cuda_visible_devices()` not detecting GPU HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvitop.