Python
Installing packages with pip (not recommended)
It is not advisable to install packages directly with pip commands like pip install --user. It can easily lead to a corrupted python environment which is not usable. Instead we recommend using python virtual environments or conda environments.
Conda / Anaconda
Initial setup
To setup your conda settings you should use command:
setup_maths_conda
You will be asked for your Maths password. After successful authentication the command will create /alt/applic/user-maint/crsid/Conda directory and configure conda to use it to store your conda environments and caches of downloaded packages.
Using conda
Whenever you want you use anaconda you first need to load environment module miniconda3 with command:
module load miniconda3
Note that anaconda is not compatible with most of other environment modules so make sure that you have no other module loaded. The exception are some modules that provide compilers.
The base environment module is very minimal so in most cases you will need to activate another conda environment. To show the list of available modules use command:
conda info -e
Maths IT team maintains a set of environments for some software frameworks used in the Faculty. They are installed in /alt/applic/Conda/conda_environments . In particular environments anacaconda_<date> contain all packages availalble in standard anaconda installations for the latest version of python3. To activate an environment you need to run command:
source activate environment_name
(note that command conda activate should not be used in Maths setup). If you cannot find an environment that contains packages needed by you, and you think they will be useful for a wider set of users in the Faculty, you can ask IT team to create a one or the package to be added to the existing one. Alternatively you can create your own environments with command:
conda create -n my_environment_name
Further details how to use conda may be found in the project documentation.
Cleaning conda caches
Conda keeps caches of all downloaded packages. It can lead to a situation when the user quota on underlying fileystem is reached. In this case it should be possible to release some space by removing conda caches with command:
conda clean -a