Anaconda

From Computer Science
Jump to: navigation, search

Anaconda is a Python environment manager so users can manage and install their own versions of python and packages.

The following are recommended steps for installing Anaconda within your account on the CS server. For student accounts, this should only be done if your instructor has told you to do so (since the installation does take up some space, we don't want it installed on every account on the system).

Install Steps

Basic install instructions: https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html

Run:

# within bash...
# check archive for latest version, and update the file variable accordingly
# https://repo.anaconda.com/archive/
base_url="https://repo.anaconda.com/archive"
file="Anaconda3-2023.09-0-Linux-x86_64.sh"

mkdir -p ~/Downloads
cd ~/Downloads

wget $base_url/"$file"

chmod +x "$file"
./"$file"

When asked whether to update your shell profile to automatically initialize conda, type yes. Then log out and log back in. Run conda --help and you should have it installed.

For bash shells, ensure that your .bashrc is configured to run in your .bash_profile:

### ~/.bash_profile

if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

Turn off auto-loading of conda base environment when you login:

# From command line:
conda config --set auto_activate_base false

# Then to turn conda environment on or off run:
conda activate
# or
conda deactivate