Home 9 Resources 9 Software 9 Python


Python is a powerful, dynamic, object-oriented programming language.

Usage on Bridges-2

To see what versions of python are available and if there is more than one, which is the default, along with some help, type

module spider python

To use python, include a command like this in your batch script or interactive session to load the python module: (note ‘module load’ is case-sensitive):

module load python

Usage on Bridges

Multiple versions of python are installed, and they are all accessible via the module command. To see what is available, type

module avail python

Be sure to check the  help for each version to see useful information about how that version was compiled and whether there are any conflicts with other modules.  Type

module help python/x.x.x

Add-on packages

Various add-on packages such as numpy, scipy, and the MKL libraries are installed with individual versions. You can see what is available in a given version by first loading the module and then using the pip command:

module load python/x.x.x pip freeze            ##  for python 2
pip3 freeze          ## for python 3

This command will give the version number of the installed packges.

User installed add-on packages

You may also install add-on packages in your own directories.  After loading the appropriate python module, use the pip install command:

 pip install --user package-name=version-number

If you want to install a specific version of your package, add the optional version-number.