Conda

From Fluids Wiki
Revision as of 12:36, 6 January 2022 by S8weber (talk | contribs) (Created page with "Conda ===== Conda is a powerful package manager and environment manager. It has a large collection of packages that often are newer than what's installed on your system. Con...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Conda

=

Conda is a powerful package manager and environment manager. It has a large collection of packages that often are newer than what's installed on your system.

Conda packages are neatly contained under your home directory in an environment. Adding or removing packages does not require root access or server admin.

These Conda environments are most helpful when a package cant be installed globally because it could cause breakage on other users or when you need multiple versions of a package.


Getting started


See the Conda guide: https://docs.conda.io/projects/conda/en/latest/user-guide/getting-started.html

I advise to go with miniconda because it's smaller without a bunch of extras you'll likely never use.


Quick start guide


Here is a short guide to get you started. Feel free to use a different tag then "mymath".

```

  1. Install

wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh bash ./Miniconda*

  1. if: during the install you included the .bashrc tweak
  2. then: you can re-login to have the conda command in your path.
  3. else: run the following script to update your PATH

source ~/miniconda3/etc/profile.d/conda.sh

  1. now you can use the conda command. It's advised to create a enviornemnnt and then switch to it

conda create --name mymath conda activate mymath

  1. In your "mymath" enviornemnnt you can confirm its using it's python using `which python`
  1. Feel free to install pacakges. For example:

conda install openblas gcc_linux-64 conda install mkl gcc_linux-64 conda install scipy numpy imageio ipython matplotlib

  1. ...after log out: to return to your python enviornemnnt use:

source ~/miniconda3/etc/profile.d/conda.sh conda activate mymath ```