search
Search
Login
Unlock 100+ guides
menu
menu
web
search toc
close
Comments
Log in or sign up
Cancel
Post
account_circle
Profile
exit_to_app
Sign out
What does this mean?
Why is this true?
Give me some examples!
search
keyboard_voice
close
Searching Tips
Search for a recipe:
"Creating a table in MySQL"
Search for an API documentation: "@append"
Search for code: "!dataframe"
Apply a tag filter: "#python"
Useful Shortcuts
/ to open search panel
Esc to close search panel
to navigate between search results
d to clear all current filters
Enter to expand content preview
icon_star
Doc Search
icon_star
Code Search Beta
SORRY NOTHING FOUND!
mic
Start speaking...
Voice search is only supported in Safari and Chrome.
Navigate to

Common Conda commands

schedule Aug 10, 2023
Last updated
local_offer
Python
Tags
tocTable of Contents
expand_more
mode_heat
Master the mathematics behind data science with 100+ top-tier guides
Start your free 7-days trial now!

When reading this page, note the following:

  • flask is a name of a library or package

  • my_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 package

  • my_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 package

  • my_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/anaconda3
my_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 package

  • my_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

robocat
Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
thumb_up
thumb_down
Comment
Citation
Ask a question or leave a feedback...
thumb_up
0
thumb_down
1
chat_bubble_outline
0
settings
Enjoy our search
Hit / to insta-search docs and recipes!