Install Miniconda

Jump to: navigation, search

Get miniconda shell script from anaconda/continuum

[username@n-9-34 ~]$ wget
--2018-10-16 14:52:55--
Resolving,, 2400:cb00:2048:1::6810:130a, ...
Connecting to||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 62574861 (60M) [application/x-sh]
Saving to: “”
100%[======================================>] 62,574,861   107M/s   in 0.6s
2018-10-16 14:52:55 (107 MB/s) - “” saved [62574861/62574861]

Run miniconda3 installer

[username@n-9-34 ~]$ bash 
Welcome to Miniconda3 4.5.11
(follow wizard steps and miniconda3 will be installed)
Do you accept the license terms? [yes|no]
[no] >>> yes
Miniconda3 will now be installed into this location:
 - Press ENTER to confirm the location
 - Press CTRL-C to abort the installation
 - Or specify a different location below
[/nfs/home/<username>/miniconda3] >>> /nfs/home/<username>/miniconda3
Do you wish the installer to prepend the Miniconda3 install location
to PATH in your /nfs/home/<username>/.bashrc ? [yes|no]
[no] >>> yes
Thank you for installing Miniconda3!

Log out then log back in OR run shell so your shell (bash or csh/tcsh) will be aware of the newly installed conda commands.

Create a new conda environment with packages of your choosing. In this example, I will create an openeye python3 environment with relevant packages. $ conda create --name <environment name> <additional packages to install in environment>

$ conda create --name oepython3 python=3
Solving environment: done
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

List your conda environments. See that the environment you just created is there.

[username@n-9-34 ~]$ conda info --envs
# conda environments:
base                  *  /nfs/home/<username>/miniconda3
oepython3                /nfs/home/<username>/miniconda3/envs/oepython3

Activate your conda environment to customize it or work with it. I will be adjusting my openeye environment.

[<username>@n-9-34 ~]$ source activate oepython3
(oepython3) [<username>@n-9-34 ~]$

If you don't need your conda environment anymore. Deactivate it.

(oepython3) [<username>@n-9-34 ~]$ conda deactivate
[<username>@n-9-34 ~]$

Sharing Conda Environments

If you run into a coworker whose using a conda environment and you would like the same environment, ask your coworker to export the environment into a YAML file.

$ conda env export > environment.yml

The user who wants to use that environment file will create a new environment with the YAML file as an argument

$ conda env create -f environment.yml