Comments (10)
Currently on Arch Linux there are only packages for pystatgrab for Python 2.7. Your installation is looking at the 3.2 Python installation because that is where /usr/bin/python points to currently. You need to run configure like this to point to Python2:
./configure PYTHON=/usr/bin/python2
This should allow you to successfully make autoconf use Python 2.7 so that it can see the pystatgrab modules.
Also to note, you will also need to change #!/usr/bin/python
to #!/usr/bin/python2
in /usr/local/bin/glances.py since you will want glances to run using Python2.
from glances.
Similar problem (on Archlinux) but with Python 3.2.2.
Though, glances.py
will not work :(
$ glances.py
File "/usr/local/bin/glances.py", line 53
print "Error: Can not init the libstatgrab library.\n"
^
SyntaxError: invalid syntax
from glances.
jpablobr,
You most likely will need to run this with Python2. I've changed the #! line of /usr/local/bin/glances.py from #!/usr/bin/python
to #!/usr/bin/python2
and everything is working for me now.
If you used the pystatgrab package from pacman then you most likely only have modules for Python 2.7 and not Python 3.2 so using /usr/bin/python won't work.
from glances.
@ahamilton55 thanks, though the following is what I'm getting know:
7Traceback (most recent call last):
File "/usr/local/bin/glances.py", line 486, in <module>
main()
File "/usr/local/bin/glances.py", line 449, in main
init()
File "/usr/local/bin/glances.py", line 444, in init
screen = glancesScreen(refresh_time)
File "/usr/local/bin/glances.py", line 158, in __init__
curses.noecho() ; curses.cbreak() ; curses.curs_set(0)
_curses.error: cbreak() returned ERR
That's with #!/usr/bin/python2
or #!/usr/bin/python2.7
shebangs.
from glances.
Hmm. Not totally sure. Do you have ncurses installed? I currently have ncurses and python-urwid installed but these aren't explicitly stated dependencies.
from glances.
yes, ncurses-5.9-2
and python-urwid-0.9.9.2-1
:/
from glances.
Sorry I'm not sure then why it isn't working then. It's currently working fine for me.
from glances.
My install works with the PKGBUILD of AUR and in fact it change #!/usr/bin/python to #!/usr/bin/python2. But when yaourt build the PKGBUILD the error remains.
The program works fine but I want know why there is an error ...
from glances.
I hinted at what the error was referring to in my first comment. What seems to be happening is that the yaourt build is referencing /usr/bin/python
which on Arch is Python 3.2. pystatgrab is only used with python2 in Arch so it's placed in /usr/lib/python2.7/site-packages/
so when it goes to check if pystatgrab is loaded and running it fails. The specific error above is throwing a syntax error because in Python 3 you would write that print statement like the following:
print("Error: cannot init the libstatgrab library.\n")
So glances properly checks and errors out but since yaourt is using Python 3 to test the package it gets the error when printing out the error.
Also this is not an issue with glances but with the way that yaourt is compiling glances.
from glances.
Ok thanks, i think i can close the issue so.
from glances.
Related Issues (20)
- Migrate from Makefile to Taskfile
- cant get to cpu temp on any instance of glances.
- pkg_resources.DistributionNotFound: The 'Glances==2.5.1' distribution was not found and is required by the application
- Disable UI if an error occurs and if an export module is enabled HOT 3
- Alert timestamp is incorrect HOT 3
- Encoding issue when running Glances with sudo on CentOS 7
- [fs]not get device_name and percent in action_repeat HOT 5
- TERM setting causes glances to crash HOT 3
- Make the action {{ mustache }} fully compliant standard
- Very high CPU load HOT 12
- Uninstall from easy install HOT 1
- psutil library not found. Glances cannot start. HOT 2
- Refactor Events (/alarms) datamodel.
- The log is spammed with appamor denied messages HOT 8
- Remove log messages from Podman HOT 1
- Rest API version should be change from 3 to 4 HOT 1
- Plugin - Hello World HOT 1
- Please add a startup flag to select an alternate web server static file path
- Randomly stops working. E.g. the process does not exits but trying to visit the page will not load HOT 2
- Docker containers stopped showing with error HTTPConnection.request() got an unexpected keyword argument 'chunked' HOT 5
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 glances.