Common Conda commands
Start your free 7-days trial now!
When reading this page, note the following:
flask
is a name of a library or packagemy_env
is a name of an Conda environment
list
To get a list of all the libraries that we've installed so far:
$ conda list
To get a list of all the libraries installed in a specific environment:
$ conda list -n my_env
install
To install new packages:
$ conda install flask
To install new packages for a specific environment:
$ conda install -n my_env flask
When reading this page, note the following:
flask
is a name of a library or packagemy_env
is a name of an Conda environment
update
To update packages:
$ conda update flask
To update Conda itself:
$ conda update conda
To update packages for a specific environment:
$ conda update -n my_env flask
remove
To remove a package:
$ conda remove flask
To remove packages for a specific environment:
$ conda remove -n my_env flask
When reading this page, note the following:
flask
is a name of a library or packagemy_env
is a name of an Conda environment
info
To check useful information about your Conda:
conda info
active environment : base active env location : /Users/SkyTowner/opt/anaconda3 ... user config file : /Users/SkyTowner/.condarc populated config files : /Users/SkyTowner/.condarc conda version : 4.8.3 conda-build version : 3.18.9 python version : 3.7.4.final.0 virtual packages : __osx=10.15.3 base environment : /Users/SkyTowner/opt/anaconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/osx-64 ... package cache : /Users/SkyTowner/opt/anaconda3/pkgs ... envs directories : /Users/SkyTowner/opt/anaconda3/envs
To see all your Conda environments:
$ conda info --envs
# conda environments:#base * /Users/SkyTowner/opt/anaconda3my_env /Users/SkyTowner/opt/anaconda3/envs/my_env
Here, the *
indicates that base
is the currently active environment.
activate
To activate a Conda environment:
$ conda activate my_env
Here, replace my_env
with the name of the Conda environment you want to activate.
After you run the command, you should see (my_env)
appended at the front:
(my_env) Macbook:~ SkyTowner$
When reading this page, note the following:
flask
is a name of a library or packagemy_env
is a name of an Conda environment
deactivate
To deactivate a Conda environment:
$ conda deactivate my_env
This brings us back to the base
or root
environment.
version
To get your current conda version:
$ conda --version
conda 4.8.3
conda info