Giter Club home page Giter Club logo

Comments (10)

ahamilton55 avatar ahamilton55 commented on April 28, 2024

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.

jpablobr avatar jpablobr commented on April 28, 2024

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.

ahamilton55 avatar ahamilton55 commented on April 28, 2024

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.

jpablobr avatar jpablobr commented on April 28, 2024

@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.

ahamilton55 avatar ahamilton55 commented on April 28, 2024

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.

jpablobr avatar jpablobr commented on April 28, 2024

yes, ncurses-5.9-2 and python-urwid-0.9.9.2-1 :/

from glances.

ahamilton55 avatar ahamilton55 commented on April 28, 2024

Sorry I'm not sure then why it isn't working then. It's currently working fine for me.

from glances.

erufu avatar erufu commented on April 28, 2024

@ahamilton55

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.

ahamilton55 avatar ahamilton55 commented on April 28, 2024

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.

erufu avatar erufu commented on April 28, 2024

Ok thanks, i think i can close the issue so.

from glances.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.