Conda: Difference between revisions
m (a few minor edits) |
|||
Line 1: | Line 1: | ||
Conda is a powerful package manager and environment manager. It has a large collection of packages that often are newer than what | Conda is a powerful package manager and environment manager for Python. It has a large collection of packages that often are newer than what comes with the operating system. | ||
Conda packages are neatly contained under your home directory in an environment. Adding or removing packages does not require root access or server | Conda packages are neatly contained under your home directory in an environment. Adding or removing packages does not require root access or server administrative privilege. | ||
These Conda environments are most helpful when a package | These Conda environments are most helpful when a package cannot be installed globally because it could cause breakage for other users, or when you need multiple versions of a package. | ||
== Getting started == | == Getting started == | ||
See the | See the "Miniconda quick start guide" below, or the Conda guide: | ||
https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html | https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html | ||
We suggest miniconda over anaconda because it takes a minimalistic approach. | |||
== Miniconda quick start guide == | == Miniconda quick start guide == | ||
Line 25: | Line 25: | ||
# Run the following to have the conda command available on your shell | # Run the following to have the conda command available on your shell | ||
source ~/miniconda3/etc/profile.d/conda.sh | source ~/miniconda3/etc/profile.d/conda.sh | ||
# if using | # if using tcsh or csh, run this instead: source ~/miniconda3/etc/profile.d/conda.csh | ||
# HINT: you can add the source script to ~/.bashrc or ~/.cshrc so conda is available on next login. | # HINT: you can add the source script to ~/.bashrc or ~/.cshrc so conda is available on next login. | ||
Line 34: | Line 34: | ||
conda activate mymath | conda activate mymath | ||
# examples installing packages into the | # examples installing packages into the activated environment: | ||
conda install mkl gcc_linux-64 | conda install mkl gcc_linux-64 | ||
conda install openblas | conda install openblas | ||
conda install scipy numpy imageio ipython matplotlib | conda install scipy numpy imageio ipython matplotlib | ||
</pre> | </pre> |
Revision as of 18:16, 6 January 2022
Conda is a powerful package manager and environment manager for Python. It has a large collection of packages that often are newer than what comes with the operating system.
Conda packages are neatly contained under your home directory in an environment. Adding or removing packages does not require root access or server administrative privilege.
These Conda environments are most helpful when a package cannot be installed globally because it could cause breakage for other users, or when you need multiple versions of a package.
Getting started
See the "Miniconda quick start guide" below, or the Conda guide: https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html
We suggest miniconda over anaconda because it takes a minimalistic approach.
Miniconda quick start guide
Here is a short guide to get you started. Feel free to use a different tag than "mymath".
# Install wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh chmod +x Miniconda3-py39_4.10.3-Linux-x86_64.sh ./Miniconda3-py39_4.10.3-Linux-x86_64.sh # Run the following to have the conda command available on your shell source ~/miniconda3/etc/profile.d/conda.sh # if using tcsh or csh, run this instead: source ~/miniconda3/etc/profile.d/conda.csh # HINT: you can add the source script to ~/.bashrc or ~/.cshrc so conda is available on next login. # It is advised to create an environment for each project. # If you skip these two steps everything will get installed directly in ~/miniconda3 conda create --name mymath conda activate mymath # examples installing packages into the activated environment: conda install mkl gcc_linux-64 conda install openblas conda install scipy numpy imageio ipython matplotlib