Giter VIP home page Giter VIP logo

Comments (6)

FriedrichFroebel avatar FriedrichFroebel commented on May 20, 2024 1

Maybe the workflow described in this Stackoverflow question allows you to use the gi module from your Anaconda installation.

from pympress.

Cimbali avatar Cimbali commented on May 20, 2024

If you installed python3-gi you really should have the gi module.

It seems that you are using a python version inside an installation of anaconda. You should you have a different python installation, and you probably installed gi for one and pympress for the other. In that case, try forcing the python outside the anaconda installation (for example in the default location, it could be /usr/bin/python3:

pip uninstall pympress
/usr/bin/python3 -m pip install pympress
/usr/bin/python3 -m pympress

If that fixes it, you should check what defaults where as python installations go, on your system. Maybe default to using the non-anaconda python, or install gi for the anaconda python.

To make the above fix more definitive, you can modify the pympress entry point (you can find out where it is using which pympress, usually at $HOME/.local/bin/pympress) to make sure it points to the non-anaconda python installation (on the first line, after the initial #!). From there on just running pympress should be fine.

from pympress.

PierreQuinton avatar PierreQuinton commented on May 20, 2024

Thank you for the answer, I think we can close this one.

from pympress.

PierreQuinton avatar PierreQuinton commented on May 20, 2024

Hi,

I had another problem with the import of cairo, I tried solving it in the same fashion but it didn't work, after a few research it appears that there is no cairo for python2 and so we need to use python3 (which I thought would be done using pympress3) but at the begining of the file in /usr/bin/pympress and /usr/bin/pympress3 we have the following line :
#!/usr/bin/python
changing it to python3 worked for me :
#!/usr/bin/python3

from pympress.

FriedrichFroebel avatar FriedrichFroebel commented on May 20, 2024

Using apt-cache search python cairo on my Ubuntu system, it says that there is a Cairo package for Python2 (shortened output):

python-cairo - Python bindings for the Cairo vector graphics library
python-cairo-dbg - Python bindings for the Cairo vector graphics library (debug extension)
python-cairo-dev - Python cairo bindings: development files
python3-cairo - Python 3 bindings for the Cairo vector graphics library
python3-cairo-dev - Python 3 cairo bindings: development files
python3-cairo-doc - Python 3 cairo bindings: documentation files
python3-gi-cairo - Python 3 Cairo bindings for the GObject library
python-gi-cairo - Python Cairo bindings for the GObject library

Another alternative (instead of modifying the Shebang line of an installed package): Calling python3 -m pympress instead of pympress from the terminal should do the trick to (when doing so, the Shebang line is ignored).

from pympress.

Cimbali avatar Cimbali commented on May 20, 2024

if it works for you we can close this issue, @PierreQuinton.

The moral of the story is to make sure the same python installation if used for pympress as well as for all its dependencies.

from pympress.

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.