Bits & Bytes online Edition




Python infrastructure at the MPCDF

Klaus Reuter

The Python programming language is becoming more and more popular in scientific computing and data analysis. On MPCDF systems, a selection of important Python modules is provided, in particular an optimized build of the NumPy/SciPy stack that is linked against Intel MKL. The language versions 2.7 and 3 are supported. Use the command 'module avail' and see the 'python' section for an up-to-date list of the available software.

For Python, a very large package repository is available on the Internet (see https://pypi.python.org). MPCDF users request many of those packages regularly, however it is often not reasonable to provide the particular packages site-wide. To enable users to easily download and install Python software, 'pip' is now installed along with the Python interpreters. The command 'pip install --user PACKAGE_NAME' can be used to automatically install a certain package together with its dependencies locally to a user's home directory. The Python package is then located at '~/.local' and is automatically found by the interpreter. Please note that it is potentially important to load the 'python{27,33,35}/scipy' module before invoking 'pip' in order to satisfy the requirements for NumPy and SciPy that many scientific packages have.

In addition to the software provided by the modules 'python{27,33,35}/*' we have recently rolled out the versions 2 and 3 of Anaconda Python. Anaconda is a Python distribution available for free under a BSD-type license. On MPCDF systems it is accessible via the environment modules 'anaconda/{2,3}'. By default, Anaconda contains numerous packages for scientific computing and data analysis that are updated on a regular basis. Anaconda mitigates the installation effort which is significant for certain packages and enables MPCDF staff to react more quickly to user requests. The aforementioned 'pip' tool is available under Anaconda, as well.