Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

While we have installed a small number of highly-used packages to each version of Python, we encourage users to maintain their own Python packages. This ensures that the user has no discontinuity in their workflow waiting for packages to be installed and that packages work with the user's chosen, loaded Python version module. Python packages are built specifically to a version of Python and may not work properly if a different version of Python is loaded. For example, there is still a great disparity between Python 2 and Python 3. O2's "module" feature allows users to quickly and easily switch between Python versions.

Useful commands:



Code Block
module avail python

shows the versions of Python installed on O2 (requires gcc/6.2.0 to be loaded)

Code Block
module load python/version

loads an individual module (substitute version for an actual version)

Code Block
module unload python/version

unloads an individual module

Code Block
which python

shows the current version of Python loaded

Code Block
pip freeze

shows what packages are installed for currently loaded Python module

Note that in order for module avail python to give any output, you must have gcc/6.2.0 loaded into your environment. Alternately, you can use module spider python to circumvent this, but you will still need gcc/6.2.0 loaded in order to load any python modules that are installed.


Code Block
(venv)mfk8@login01:~$ deactivate


The executable for Python 3.x is python3 and not python, the choice was made by the Developers to mark a clear difference between version 2.x and 3.x, as  as old python 2.x scripts might not be fully compatible across the version jump.

A symbolic link python → python3 is created within each python 3.x virtual environment, this link allows to execute python3 scripts using python instead of python3 when the virtual environment is active, however the link does not exist outside of the python virtual environment.