search
Search
Join our weekly DS/ML newsletter layers DS/ML Guides
menu
menu search toc more_vert
Robocat
Guest 0reps
Thanks for the thanks!
close
Comments
Log in or sign up
Cancel
Post
account_circle
Profile
exit_to_app
Sign out
help Ask a question
Share on Twitter
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
A
A
brightness_medium
share
arrow_backShare
Twitter
Facebook

Common Conda commands

Environment Setup
chevron_right
Anaconda
schedule Jul 1, 2022
Last updated
local_offer Python
Tags
tocTable of Contents
expand_more

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

mail
Join our newsletter for updates on new DS/ML comprehensive guides (spam-free)
robocat
Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
Ask a question or leave a feedback...
0
thumb_down
0
chat_bubble_outline
0
settings
Enjoy our search
Hit / to insta-search docs and recipes!