Python software
Instructions on how to use the Conda tool to build Python environments
Python versions
Python 2 is no longer supported and so all new software should be developed with Python 3. There may be some older software that still requires Python 2 - the information below provides details on how you might run this software.
Obtaining Python
- On your personal laptop
Whilst Linux and macOS ship with Python by default (often via the 'python3' command), the version provided isn't always the most up-to-date and installing additional packages may require administrative privileges. You should be able to access python on Windows using the 'python' or 'python3' command on the terminal.
If the command returns an error on Windows, install python by following the instructions here
We recommend using MiniForge (bare-bones package manager) or Miniconda/Anaconda (complete analysis environment). Choose Anaconda if you want to replicate a MATLAB environment as it includes all the common libraries by default - but be aware that this has a restrictive software license, which, depending on your use case, may make it unsuitable for use with your work - MiniForge has a completely open license. Miniconda/Anaconda requires a subscription to use in a commercial setting (it is free for academic use).
Careful, Anaconda might interact with other softwares. Its installation/uninstallation might create issues. Which is why miniforge/miniconda is recommended.
Once downloaded, run the install script and choose a location to install the conda tools too - the suggested defaults are recommended, e.g. installing conda into your home folder. Once installed, it would be a good idea to immediately check you have the current release of the conda tool. Upgrade with the command:
- On the cluster
The FMRIB SLURM cluster already has Miniforge and Miniconda available via environment modules, so these installation instructions are only relevant for your own laptop/desktop computer.
To use 'conda' on the cluster, use: