- Start by opening a Terminal window and running the following commands:
conda update condaconda update anaconda
These commands update both conda and Anaconda to the most recent versions. This is always recommended before creating a new environment.
- Next, run the following line to create a new environment named myenv:
conda create --name myenv
- You will be asked for confirmation and conda will then create the new environment. We now need to activate the new environment. For Linux and macOS, run the following command in the terminal:
source activate myenv
- In Windows, run the following:
activate myenv
- Notice that the command line changes to reflect the active environment, as shown in the following example:
(myenv) computer:~ ...