Using Python
Example
The following example shows how to use Python:
$module switch env env/2023Q4-gcc-openmpi$python3 -m venv $USW/myvenv$source $USW/myvenv/bin/activate(myvenv)$pip3 install ...
Remark: Typically one would switch to the latest pgksrc Module. At
the time of writing that was env/2023Q4-gcc-openmpi.
Selecting a particular version of Python
By switching to a pgksrc Module typically several version of Python become available, for example:
$module switch env env/2023Q4-gcc-openmpi$python2 --version Python 2.7.18$python3 --version Python 3.11.7$python3.10 --version Python 3.10.13
But there is no python command:
$python --version -bash: python: command not found
For convenience there are Modules called pythonversion
which make a particular version of Python available under the name
python, for example:
$module switch env env/2023Q4-gcc-openmpi$module load pythonversion/3.10 pythonversion: /sw/env/gcc-13.2.0_openmpi-4.1.6/pkgsrc/2023Q4/bin/python3.10 module: loaded pythonversion/3.10$python --version Python 3.10.13