glances
glances copied to clipboard
"python setup.py egg_info" failed with error code 1
Description
curl -L https://bit.ly/glances | /bin/bash
...
Подготовка к распаковке …/20-python-docker_2.5.1-1_all.deb …
Распаковывается python-docker (2.5.1-1) …
Выбор ранее не выбранного пакета python-openssl.
Подготовка к распаковке …/21-python-openssl_17.5.0-1ubuntu1_all.deb …
Распаковывается python-openssl (17.5.0-1ubuntu1) …
Настраивается пакет python-idna (2.6-1) …
Настраивается пакет python-urllib3 (1.22-1ubuntu0.18.04.2) …
Настраивается пакет python-asn1crypto (0.24.0-1) …
Настраивается пакет python-certifi (2018.1.18-2) …
Настраивается пакет python-pkg-resources (39.0.1-2) …
Настраивается пакет python-backports.ssl-match-hostname (3.5.0.1-1) …
Настраивается пакет python-websocket (0.44.0-0ubuntu2) …
update-alternatives: используется /usr/bin/python2-wsdump для предоставления /usr/bin/wsdump (wsdump) в автоматическом режиме
Настраивается пакет python-cffi-backend (1.11.5-1) …
Настраивается пакет golang-docker-credential-helpers (0.5.0-2) …
Настраивается пакет python-enum34 (1.1.6-2) …
Настраивается пакет libexpat1-dev:amd64 (2.2.5-3ubuntu0.2) …
Настраивается пакет libpython2.7-dev:amd64 (2.7.17-1~18.04ubuntu1.2) …
Настраивается пакет python-ipaddress (1.0.17-1) …
Настраивается пакет python2.7-dev (2.7.17-1~18.04ubuntu1.2) …
Настраивается пакет libpython-dev:amd64 (2.7.15~rc1-1) …
Настраивается пакет python-chardet (3.0.4-1) …
Настраивается пакет python-dockerpycreds (0.2.1-1) …
Настраивается пакет python-dev (2.7.15~rc1-1) …
Настраивается пакет python-cryptography (2.1.4-1ubuntu1.4) …
Настраивается пакет python-requests (2.18.4-2ubuntu0.1) …
Настраивается пакет python-openssl (17.5.0-1ubuntu1) …
Настраивается пакет python-docker (2.5.1-1) …
Обрабатываются триггеры для man-db (2.8.3-2ubuntu0.1) …
Обрабатываются триггеры для doc-base (0.10.8) …
Обработка 1 добавленный файл doc-base...
Регистрация документа в scrollkeeper...
Install dependencies
sudo pip install setuptools glances[action,batinfo,browser,cpuinfo,docker,export,folders,gpu,graph,ip,raid,snmp,web,wifi]
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006ec932b4/setuptools-44.1.1-py2.py3-none-any.whl (583kB)
100% |████████████████████████████████| 583kB 661kB/s
Collecting glances[action,batinfo,browser,cpuinfo,docker,export,folders,gpu,graph,ip,raid,snmp,web,wifi]
Downloading https://files.pythonhosted.org/packages/e1/e4/86b6c447c88fc744c7a70dc69bf23baac7cffa7b39a84e887e507a896241/Glances-3.1.5.tar.gz (6.8MB)
100% |████████████████████████████████| 6.8MB 274kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named setuptools
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lpJ5sy/glances/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For an enhancement or new feature: Describe your needs.
Versions
- Operating System (lsb_release -a):
$ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 19.3 Tricia
Release: 19.3
Codename: tricia
Logs
nothing
Try to run:
apt-get install -y python-setuptools
and start again
Installed successfully, but...
arris@whitegoldtower:~$ glances
Traceback (most recent call last):
File "/usr/local/bin/glances", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/glances/__init__.py", line 143, in main
start(config=config, args=args)
File "/usr/local/lib/python2.7/dist-packages/glances/__init__.py", line 108, in start
mode = GlancesMode(config=config, args=args)
File "/usr/local/lib/python2.7/dist-packages/glances/standalone.py", line 78, in __init__
self.stats.update()
File "/usr/local/lib/python2.7/dist-packages/glances/stats.py", line 234, in update
self._plugins[p].update()
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_plugin.py", line 925, in wrapper
ret = fct(self, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_plugin.py", line 935, in wrapper
ret = fct(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_connections.py", line 116, in update
logger.debug('Can not get network connections track ({})'.format(e))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 10: ordinal not in range(128)
$ ls -la /proc/sys/net/netfilter
итого 0
dr-xr-xr-x 1 root root 0 дек 23 14:34 .
dr-xr-xr-x 1 root root 0 дек 23 12:13 ..
dr-xr-xr-x 1 root root 0 дек 23 14:34 nf_log
-rw-r--r-- 1 root root 0 дек 23 14:34 nf_log_all_netns
Clearly look a trouble about Python2 and Unicode.
In case you can Use Python3, you certainlly fixe the trouble easilly. Python2 is deprecated from a moment from now, and you look to have a Special CharSet it haven't been tested. Actually you system look to use UTF-8 , you certainlly have to install Python3 for have a native UTF-8 support.
If you want try to fixe it you have to try a str($STRING).code().decode() on the line 114 of plugins/glances_connections.py
with open(self.conntrack[i], 'r') as f:
stats[i] = float(f.readline().rstrip("\n"))
Actually you system return a UTF-8 symbol , and the poor ascii can't read it, and unfortunally it have no true way for determine a coding char for the port str(). The workarround consit generally to chain code and decode.
@Hierosme , I use:
curl -L https://bit.ly/glances | /bin/bash
and don't wont manually fixing code after curling sources, sorry.
normaly you just have to install python3, nothing about monify anything.
By default, installed both versions.
/usr/local/bin$ python3 glances
Traceback (most recent call last):
File "glances", line 7, in <module>
from glances import main
ModuleNotFoundError: No module named 'glances'
I don't understand nothing. Software does not work
yes Glances is a software you can't call it with python3 glances
.
you wan see wish python version is you default one with
whish python
or
python --version
You trouble is UTF-8 Charset due to you system setting, i just suggess to try with Python3.
from: https://stackoverflow.com/questions/5846167/how-to-change-default-python-version
$ which python3
/usr/local/bin/python3
Write alias in bash_profile
vi ~/.bash_profile
alias python='/usr/local/bin/python3'
Reload bash_profile
source ~/.bash_profile
Confirm python command
$ python --version
Python 3.6.5
arris@whitegoldtower:~$ python --version
Python 3.6.9
arris@whitegoldtower:~$ glances
Traceback (most recent call last):
File "/usr/local/bin/glances", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/glances/__init__.py", line 145, in main
start(config=config, args=args)
File "/usr/local/lib/python2.7/dist-packages/glances/__init__.py", line 110, in start
mode = GlancesMode(config=config, args=args)
File "/usr/local/lib/python2.7/dist-packages/glances/standalone.py", line 78, in __init__
self.stats.update()
File "/usr/local/lib/python2.7/dist-packages/glances/stats.py", line 234, in update
self._plugins[p].update()
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_plugin.py", line 993, in wrapper
ret = fct(self, *args, **kw)
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_plugin.py", line 1003, in wrapper
ret = fct(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_connections.py", line 116, in update
logger.debug('Can not get network connections track ({})'.format(e))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 10: ordinal not in range(128)
Nothing changed.
I'm really confuse,
The message you copy indicate that using Python 2.7 /usr/local/lib/python2.7/dist-packages/glances indicate you ahve only install glance for python2 and python2 do not support you charset.
May be a pip3 install psutils glances
after have clean you previus python2 installation
after have clean you previus python2 installation
can't uninstall python2 :
arris@whitegoldtower:~$ sudo apt remove python2
...
E: Unable find package python2
arris@whitegoldtower:~$ sudo apt remove python
Next packages will DELETED:
apturl apturl-common boot-repair boot-sav boot-sav-extra cherrytree cinnamon cinnamon-dbg cinnamon-screensaver dia dia-common dia-shapes gdebi gdebi-core gir1.2-xapp-1.0 glade2script mint-common
mint-meta-cinnamon mint-meta-core mintbackup mintdesktop mintdrivers mintinstall mintlocale mintmenu mintreport mintsources mintstick mintsystem mintupdate mintwelcome nemo nemo-data nemo-dbg
nemo-fileroller nemo-preview nemo-share ntfs-config nvidia-prime-applet python python-all python-all-dev python-apt python-asn1crypto python-attr python-automat python-backports.ssl-match-hostname
python-cairo python-certifi python-cffi-backend python-chardet python-click python-colorama python-configobj python-constantly python-crypto python-cryptography python-dateutil python-dbus
python-dev python-docker python-dockerpycreds python-enchant python-enum34 python-gi python-gi-cairo python-glade2 python-gobject-2 python-gtk2 python-gtksourceview2 python-hyperlink python-idna
python-incremental python-ipaddress python-keyring python-keyrings.alt python-ldb python-lockfile python-notify python-openssl python-pam python-pip python-pkg-resources python-pyasn1
python-pyasn1-modules python-pyparsing python-requests python-samba python-secretstorage python-serial python-service-identity python-setproctitle python-setuptools python-six python-squaremap
python-tdb python-twisted-bin python-twisted-core python-urllib3 python-websocket python-wheel python-wxgtk3.0 python-wxversion python-xdg python-xlib python-zope.interface samba-common-bin
software-properties-common speedtest-cli taskcoach ubuntu-system-adjustments xed xed-common xed-dbg
ВНИМАНИЕ: Следующие пакеты первой необходимости будут удалены.
НЕ ДЕЛАЙТЕ этого, если вы НЕ представляете себе все возможные последствия!
mintsources mint-common (вследствие mintsources) gir1.2-xapp-1.0 (вследствие mintsources)
i.e. my OS will broke
Yes you OS will Die, don't uninstall Python2.
You trouble is commun install trouble python2 vs python3
For install a python3 package use pip3 command , where generally pip point to python2
sudo apt-get remove glances
sudo pip uninstall psutils glances
pip uninstall psutils glances
sudo pip3 install psutils glances
hope it will fixe you trouble
Regards
My OS is cursed :(
root@whitegoldtower:~# sudo pip3 install psutils glances
sudo: pip3: command not found
root@whitegoldtower:~# apt install pip3
....
E: Can't find package pip3
@KarelWintersky
If you are still interested, can you just mention your operating system? It would make it easier to help you.