Difference between revisions of "Anaconda"

From Computer Science
Jump to: navigation, search
(Created page with "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 Anacond...")
 
(Install Steps)
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
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).
 
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
+
=Install Steps=
  
 
Basic install instructions: https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html
 
Basic install instructions: https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html
Line 12: Line 12:
 
# check archive for latest version, and update the file variable accordingly
 
# check archive for latest version, and update the file variable accordingly
 
# https://repo.anaconda.com/archive/
 
# https://repo.anaconda.com/archive/
base_url="https://repo.anaconda.com/archive/"
+
base_url="https://repo.anaconda.com/archive"
 
file="Anaconda3-2023.09-0-Linux-x86_64.sh"
 
file="Anaconda3-2023.09-0-Linux-x86_64.sh"
  
Line 24: Line 24:
 
</pre>
 
</pre>
  
Then log out and log back in.  Run <code>conda --help</code> and you should have it installed.
+
When asked whether to update your shell profile to automatically initialize conda, type yes. Then log out and log back in.  Run <code>conda --help</code> and you should have it installed.
  
 
For <code>bash</code> shells, ensure that your <code>.bashrc</code> is configured to run in your <code>.bash_profile</code>:
 
For <code>bash</code> shells, ensure that your <code>.bashrc</code> is configured to run in your <code>.bash_profile</code>:
Line 33: Line 33:
 
     . ~/.bashrc
 
     . ~/.bashrc
 
fi
 
fi
<pre>
+
</pre>
  
 +
Turn off auto-loading of conda base environment when you login:
 
<pre>
 
<pre>
### Turn off auto-loading of conda base environment when you login
 
 
# From command line:
 
# From command line:
 
conda config --set auto_activate_base false
 
conda config --set auto_activate_base false

Latest revision as of 15:24, 10 October 2023

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