Skip to content

Installing Packages

Once you have an environment created, you are ready to install packages into it.

There are a few ways to do this. You can install things one-by-one with either conda install ____ or pip install ____.

If you have an environment.yml file and want to import that, check out this section of the Conda page.

conda install packages

If you plan on using a GPU

To make sure your code will run on GPUs install a recent cuda package that works with the NVIDIA GPUs on HiPerGator. The L4 GPUs require cuda >= 12.0 and B200 GPUs require cuda >= 12.8.1

See the UFIT-RC provided pytorch installs for examples if needed.

Conda can detect if there is a GPU available on the computer, so the easiest approach is to run the conda install command in a GPU session. Alternatively, you can run conda install on any node, or if a cpu-only pytorch package was already installed, by explicitly requiring a GPU version of pytorch when running conda install.

Load the conda module

To get started, be sure to load the conda module and activate your environment.

module load conda
conda activate my_env

module load conda
conda activate /blue/mygroup/share/conda/envs/my_env
Adjust the path based on the location of your environment.
Example of installing PyTorch

Start with installing Python:

conda install python cuda=12.8

Pytorch no longer supports conda. From the PyTorch Installation page, use:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128

Install Additional Packages

Use conda install package-name to install any additional packages you need.

Add Packages to Your Environment with pip install

Not everything is available in a conda channel, and you may need to use pip to install some packages. As long as your environment is active (look for the environment name in the prompt (my_env) [username@login8 ~]$), pip will install packages within the environment, not your home directory.

pip install package-name

It is recommended to only use pip install after you have installed as many of your packages as possible via conda. conda install will not always recognize and appropriately deal with dependencies that have been installed by pip.

Next: Using Conda Environments in Scripts