Apart from the Python 2 installations, we also provide additional Python 3 installations.
These are usually based on a more recent Python version, and includes Python modules that are requested by many NSC users.
As of September 2016, we have also installed the Anaconda Python distribution 4.1.1.
We keep Python 2 installations separate.
Load the Python module corresponding to the version you want to use, e.g
module load python3/3.6.1
This will add the Python commands to your search path.
For running python in parallel using
mpi4py it does not work at the moment with
mpprun. Instead, load the compiler module containing the mpi which the python module was built with. For example:
module load python3/3.6.1 module load buildenv-intel/2016-3
and e.g. run using (this example for 10 mpi-ranks):
mpiexec.hydra -n 10 -bootstrap slurm python your_script.py
mpirun will most probably also work, the above is a safer option.
Remember to change “python” to “python3” if needed.