Next: How SIC variables are
Up: Installing PyGILDAS
Previous: Compiling Gildas with your
Contents
Index
Compiling Gildas with Python 2, bypassing Python 3
Python 3 is now the default python executable under some Linux
distributions, but it is not yet supported by the Gildas-Python
binding. You can still compile and use Gildas with Python 2, with a
few restrictions.
- first make sure Python 2 (executable, headers and libraries) are
available on your system. It is very likely they are available on
your system e.g. the executable is /usr/bin/python2. If not,
you can compile your own Python version (see
Section 3.1.2).
- make temporarily Python 2 the default, i.e. the python
command should start Python 2. You can achieve this by putting
e.g. a symlink named python pointing to python2 in your
$PATH (for example in your $HOME/bin).
- compile Gildas, and check carefully the messages related to
Python during the command source admin/gildas-env.sh. They
should all refer to your Python 2 installation.
If you followed correctly the above points, Gildas is now binded to
the Python 2 libraries. You have then 2 possibilities:
- if you use Python inside Gildas (i.e. SICPYTHON
commands), you can safely revert the python command to its
original state. Gildas will use independently of it the Python 2
libraries, including its specific syntax and rules.
- if you use the Gildas-Python modules (e.g. pygreg, pyclass) in
Python, then you must import them in the Python 2 executable. Either
you keep permanently the symlink python to python2 the
default, either you call explicitly python2 before importing
the modules. Here also this means you have to use Python 2 syntax
and rules.
Next: How SIC variables are
Up: Installing PyGILDAS
Previous: Compiling Gildas with your
Contents
Index
Gildas manager
2014-07-01