Python
From Montana Tech High Performance Computing
The default Python installed is 2.7.5 and 3.4.10, compiled by GCC 4.8.5. We also have Miniconda3 and Anaconda3 installed so that you can create your own Python development environments. The difference between Miniconda and Anaconda is that Anaconda has a lot more numeric and scientific libraries installed by default.
Loading the anaconda or miniconda module
Once logged into HPC, you can use the module command to load the anaconda module.
-
module load anaconda
For miniconda
-
module load miniconda
Please note that you can only use one of the "conda" modules at a time. If you have anaonda loaded, but need to switch to miniconda, you will first need to unload the anaconda module:
-
module unload anaconda
module load miniconda
Creating Anaconda or Miniconda Python environment
You can use the conda create
command to create a new Python environment.
For example, to create a Python environment named mypy38 with Python 3.8:
-
conda create --name mypy38 python=3.8
You'll then be provided with the location of the environment being created and the packages will be installed. Then type y to confirm the installation.
Using a Python Environment in miniconda or anaconda
To get a list of available conda environment, you can use the command: conda env list
Once logged into HPC, you can use the module command to load the miniconda module.
-
module load miniconda
-
module load anaconda