Versions Compared

Key

  • 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:

Command

Meaning

Code Block
module spider python

shows the versions of Python installed on O2

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 version

Code Block
which python
# or
which python3

shows the current version of Python loaded (use python for a python 2.x module, python3 for a python 3.x module)

Code Block
pip freeze

shows what packages are installed for currently loaded Python module

You can use module avail python as an alternative to module spider python, but avail will only work if you have some gcc module loaded (avail only searches exposed hierarchies, where spider searches the entire module list).

...

Relatedly, if you are experiencing execution errors with mismatched package versions, the first step to troubleshooting is to delete the $HOME/.local directory. If the error persists after taking this step, please contact rchelp@hms.harvard.edu for further assistance.

Errors related to openssl

You may run into an error involving openssl >= 2.0 versions. The only known workaround will be to downgrade the package in question to a version that is using < 2.0. For an example of this, see https://harvardmed.atlassian.net/wiki/spaces/O2/pages/1594262530/Jupyter+on+O2#urllib3-openssl-error .