Installing Python Modules

Users of Super Computing Wales don’t have permission to install libraries into system directories as might do on your own computer. Python’s pip (and pip3) package manager usually install into system directories, but have the option to install packages into your home directory by specifying the –user option. Please note that any packages you install won’t be accessible to other users and they will need to install them, themselves if they need the same modules.

To install a Python3 module we need to do the following:

module load python/3.7.0
pip3 install --user <modulename>

For example to install the Sci Kit Learn module we would run:

pip3 install --user sklearn

Which would show the following output:

Collecting sklearn
  Downloading sklearn-0.0.tar.gz
Collecting scikit-learn (from sklearn)
  Downloading scikit_learn-0.19.1-cp35-cp35m-manylinux1_x86_64.whl (12.2MB)
    100% | ************* | 12.2MB 50kB/s 
Installing collected packages: scikit-learn, sklearn
  Running install for sklearn ... done
Successfully installed scikit-learn-0.19.1 sklearn-0.0