Anaconda Tutorial - Installation and Basic Commands

Patrick Loeber

Anaconda is a free Python distribution specifically designed for scientific computing (data science, machine learning). Anaconda let's you easily manage multiple Python environments and simplifies package management.

Why multiple environments


Go to and download the latest installer for your machine. Follow the setup instructions.

Get started


Check version:

conda --version

Check more information:

conda info

Update conda:

conda update conda

Manage environments

Create a virtual environment:

conda create -n myenv

Specify a specific Python version:

conda create -n myenv Python=3.7

Specify specific packages that are installed:

conda create -n myenv Python=3.7 numpy matplotlib

Activate it (Depending on your machine):

conda activat myenv

source activate myenv
Your terminal will feature the current activated environment.

Deactivate it (Depending on your machine):

conda deactivate

source deactivate

List all environments:

conda env list

Remove a specific environment:

conda env remove -n myenv

Manage packages

Install specific packages:

conda install numpy

Install multiple packages with one command:

conda install seaborn matplotlib pandas

Deinstall packages:

conda remove numpy

List all packages in an environment:

conda list

Update a package:

conda update numpy

Search for packages :

conda search numpy

Installing with pip is also possible:
pip install numpy

It is recommended to install pip in your environment and then use your local pip version. Otherwise it will try to fall back to other ones on the machine
conda install pip
pip install numpy

Conda and Visual Studio Code

Conda integrates nicely into VS Code. It can automatically detect your available conda environments and let's you specify which one you want to use.

FREE VS Code / PyCharm Extensions I Use

✅ Write cleaner code with Sourcery, instant refactoring suggestions: Link *

* This is an affiliate link. By clicking on it you will not have any additional costs, instead you will support me and my project. Thank you! 🙏

Check out my Courses