This is an old revision of the document!
conda
command available on your computer, and you can then use conda
to install and update more python packages and their dependencies.default
channel (or repository) provided by the conda repository. This is not very useful because we will be mostly using (the same) packages provided by the conda-forge channel.Note: some extra details are available on the much older page Installing and maintaining UV-CDAT with conda. You can check later the Useful conda commands, but the official conda documentation is probably more up-to-date
By Linux-like, we mean:
cd /home/scratch01/<your_login>
C:\Scratch\<your_login>
directory:cd /mnt/c/Scratch/<your_login>
wget
to download the installer:wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
(90 Mb, 26 Feb 2021)bash Miniconda3-latest-Linux-x86_64.sh
Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no]
⇒ NO/home/share/unix_files/cdat/miniconda3<possibly_some_version_here>/
/data/jypmce/cdat/miniconda3<possibly_some_version_here>/
/home/your_login/
directory does not work. You need to accept the installation in the default location: /home/<your_login>/miniconda3
miniconda3
directory size is 342M> du -sh miniconda3 342M miniconda3 > cd miniconda3 > du -sh * 20M bin 0 compiler_compat 4.0K condabin 684K conda-meta 0 envs 16K etc 5.5M include 4.0K info 198M lib 12K LICENSE.txt 114M pkgs 604K share 4.0K shell 0 ssl 0 x86_64-conda_cos6-linux-gnu
source <installation_path>/miniconda3/etc/profile.d/conda.sh
source <installation_path>/miniconda3/etc/profile.d/conda.csh
conda
command, and use it to initialize the base environment$ which conda <installation_path>/miniconda3/condabin/conda $ which python /usr/bin/python $ conda activate (base) $ which python <installation_path>/miniconda3/bin/python
$ conda update --all [...]
miniconda3
directory size goes from 432 Mb to 581 Mb. This directory will keep on growing, which is the reason why you should put it on a (preferably non backed up) disk where you have enough spaceconda
package (just in case we did not get it with the update)conda update -n base conda
rm Miniconda3-latest-Linux-x86_64.sh
When you open a terminal, your shell needs to know where to find the conda
command used to initialize an environment, or switch between environments
You were asked the following question when installing miniconda3: Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no]
conda
directly available when you open a new terminal~/.bashrc
source <installation_path>/miniconda3/etc/profile.d/conda.sh
~/.cshrc
source <installation_path>/miniconda3/etc/profile.d/conda.csh
We choose not to add a conda activate env_name
line to the shell configuration files, in order to avoid side effects. When we open a new terminal, we get the default python available on the system. When we need a specific python environment, we just open a new window and then explicitly type: conda activate env_name
In the case of python environments maintained by a single user, but used by several users, we could do the same as in the General case, but it can be useful to have the users source an intermediate initialization file, that will then source the initialization file used in the general case. This makes it easier to maintain and change the environments, without asking users to make changes.
~/.bashrc
something likesource ~main_installer_login/.conda3_jyp.sh
.conda3_jyp.sh
file looking like conda3_jyp.sh.txt~/.cshrc
something likesource ~main_installer_login/.conda3_jyp.csh
.conda3_jyp.csh
file looking like conda3_jyp.csh.txt
[ PMIP3 Wiki Home ] - [ Help! ] - [ Wiki syntax ]