Getting started with conda#
Conda is a powerful command line tool for package and environment management that runs on Windows, macOS, and Linux.
This guide to getting started with conda goes over the basics of starting up and using conda to create environments and install packages.
Anaconda Navigator is a graphical desktop application that enables you to use conda without having to run commands at the command line.
See Getting started with Anaconda Navigator to learn more.
Before you start#
Conda is available on Windows, macOS, or Linux and can be used with any terminal application (or shell).
Open either the Command Prompt (cmd.exe) or PowerShell.
Open the Other application folder.
Open the Terminal application.
Open a terminal window.
Conda allows you to create separate environments, each containing their own files, packages, and package dependencies. The contents of each environment do not interact with each other.
The most basic way to create a new environment is with the following command:
conda create -n <env-name>
To add packages while creating an environment, specify them after the environment name:
conda create -n myenvironment python numpy pandas
For more information on working with environments, see Managing environments.
To see a list of all your environments:
conda info --envs
A list of environments appears, similar to the following:
myenvironment * /home/username/Anaconda3/envs/myenvironment
The active environment is the one with an asterisk (*).
To change your current environment back to the default
When the environment is deactivated, its name is no longer shown in your prompt, and the asterisk (*) returns to
base. To verify, you can repeat the
conda info --envs command.
You can also install packages into a previously created environment. To do this, you can either activate the environment you want to modify or specify the environment name on the command line:
# via environment activation
conda activate myenvironment
conda install matplotlib
# via command line option
conda install --name myenvironment matplotlib
For more information on searching for and installing packages, see Managing packages.
Channels are locations (on your own computer or elsewhere on the Internet) where packages are stored. By default, conda searches for packages in its default channels.
If a package you want is located in another channel, such as conda-forge, you can manually specify the channel when installing the package:
conda install conda-forge::numpy
Find more packages and channels by searching Anaconda.org.
To see your conda version, use the following command:
No matter which environment you run this command in, conda displays its current version:
If you get an error message
command not found: conda, close and reopen
your terminal window and verify that you are logged
into the same user account that you used to install conda.
To update conda to the latest version:
conda update conda
Conda compares your version to the latest available version and then displays what is available to install.
We recommend that you always keep conda updated to the latest version. For conda's official version support policy, see CEP 10.