Python is a high level programming language that aims to combine remarkable power with very clear syntax. Anaconda is a free cross-platform Python distribution from Continuum Analytics. It comes built in with various scientific Python packages such as NumPy, SciPy, Pandas, Matplotlib, Numba, etc.
Loading the module makes the Anaconda Python installation your default Python for all Python-related commands (python, ipython, pip).
We maintain an Anaconda environment as our recommended Python 3 environment. You will obtain this version if you type:
module load python3
To load a version of Python 2.7 that includes various accelerated tools including Pycuda, to enable GPU based computation, run:
module load python/anaconda1.7.0
General information about using Python at MSI is available on the main Python software documentation page.
Python 3 makes use of virtual environments, a technology that enables the creation of multiple, lightweight, independent Python environments. Using a command like
module load python3 pyvenv --system-site-packages ~/mypython
will create a virtual environment that inherits all the capabilities of the main Canopy installation in your home directory, where you can modify it or build your own Python modules. The command
would then make this local Python directory your default in that terminal until you log out or type the command deactivate. With a virtual environment activated, you can easily install new or upgraded Python modules. In many cases, simply using the pip packages manager like so:
pip install --upgrade newpackage
is all that is needed.
Some add-on modules in Anaconda need a license file. The license is free for users who register on the Continuum website with their .edu address. You will receive the license file in an email that needs to be installed into the ~/.continuum directory. To obtain the license, follow instructions on the Anaconda website.