Skip to content

Anaconda Tutorial - Installation and Basic Commands

In this Tutorial I show you how you can install and use Anaconda.


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

  • Always manage the correct versions and dependencies for your project
  • Don't spoil your system with too many site packages

Install

Go to https://www.anaconda.com/distribution and download the latest installer for your machine. Follow the setup instructions.

Get started

General

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*


PySaaS: The Pure Python SaaS Starter Kit

🚀 Build a software business faster with pure Python: Link*

* These are affiliate link. By clicking on it you will not have any additional costs. Instead, you will support my project. Thank you! 🙏