Frequently asked questions#
This section is still under construction. If you have a have a question (about GIMLi) that is not covered here, please open a GitHub issue.
Short answer: Python 3. Long answer: Currently, pygimli is functionable with all major Python versions from 3.7 on. When compiling from source, it is important that boost_python is build against the same Python version you want to use. However, many (scientific) Python projects recommend to use Python 3 for various reasons. We droped support for Python 2. In most cases you can translate your existing Python 2 scripts to Python 3 by running 2to3.
For Linux users it should be sufficient to have proper environment settings:
export PYTHONPATH=$PYTHONPATH:$HOME/src/gimli/gimli/python export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/src/gimli/build/lib export PATH=$PATH:$HOME/src/gimli/build/bin
Note, these setting will ony affect applications that have been started from the current console. To make these settings permanent, make sure to add them to your .bashrc.
Window users should use the conda/anaconda install which sets all appropriate paths to run pygimli in spyder.
If this does not work, Windows users probably need to tell spyder where your manual pygimli installation can be found by an appropriate setting of the PYTHONPATH in the spyder Menubar:/tools/PYTHONPATH manager.
If you start spyder from Windows startmenu you probably need to set the correct PATH somewhere in your windows personal settings.
You can test you installation within the console via:
python -c 'import pygimli as pg; print(pg.version())'
If there is something wrong with the environment settings you get an error like this:
python: can't open file 'import pygimli as pg; print(pg.version())': [Errno 2] No such file or directory
Rename your file to something different. One of the prerequisite library (pyQT) import the file sip.py as module for they own and just stuck.
Try python -s -c “import pygimli”. The -s option ensures that only system packages are used. This avoids conflicts with local (pip) packages.