HPCC How to Install Conda
How To Install Conda
To Install Conda Locally
If you want MiniForge locally, find your operating system Here.
Follow Conda instructions for your operating system.
To Install Conda on HPCC
Follow the HPCC tutorial on how to install Miniforge/Conda, check out the link here. The installation instructions are in the Installing MiniForge section.
If the Miniforge installation does not automatically add something to your .bashrc, please follow the instructions below. 8/25/25
Once you install conda on the HPC. You need to add the 1 of the 2 choices below to your .bashrc file in order activate conda automatically when you login to the HPC. Choice 1 is the simplier option compared to choice 2 which includes some error checking but causes issues when others try to source your conda environment. You will need to replace $USER with your eraider.
Choice 1 - Simplier Conda Activation
source /home/$USER/conda/etc/profile.d/conda.sh
export PATH=/home/$USER/conda/bin:$PATH
conda activate
Choice 2 - Error Checking Conda Activation
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/$USER/conda/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/$USER/conda/etc/profile.d/conda.sh" ]; then
. "/home/$USER/conda/etc/profile.d/conda.sh"
else
export PATH="/home/$USER/conda/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
Notes on Conda Commands
-
Version:
conda --version
-
Update:
conda update conda
-
Create environment:
conda create --name [name] [pkg(s)]
- ex: conda create --name test_environment pandas
-
List all environments (The asterisk * in it's output will indicate the active environment)
conda info --envs
-
Python Version:
python --version
-
List current packages in the active environment:
conda list
-
List all environments you have:
conda list -env
-
Search anaconda repository for a desired package:
conda search [pkg]
-
Install a specific package to the active environment:
conda install [pkg]
-
Good Packages To Install for Python:
- numpy
- matplotlib
- scipy
- pandas
- tabulate
- Other python modules that are standard and already installed in Python:
- os
- sys
- shutil
- textwrap
- argparse
Other Documentation for Conda
TTU HPCC has good documentation on Conda. Conda website has good documentation also.