How to create new env in anaconda

To create a new environment in Anaconda, you can use the conda command in your terminal or command prompt. Here are the steps:

Method 1: Using conda create

  1. Open your terminal or command prompt.

  2. Type the following command to create a new environment:

    conda create --name myenv

    Replace myenv with the name you want to give your new environment.

  3. Press Enter to create the environment. This may take a few seconds.

Method 2: Using conda env

  1. Open your terminal or command prompt.

  2. Type the following command to create a new environment:

    conda env create --name myenv

    Replace myenv with the name you want to give your new environment.

  3. Press Enter to create the environment. This may take a few seconds.

Method 3: Using Anaconda Navigator

  1. Open Anaconda Navigator.
  2. Click on the "Environments" tab.
  3. Click on the "Create" button.
  4. Enter the name of your new environment and click "Create".

Activating the new environment

Once you've created the new environment, you'll need to activate it before you can start using it. To activate the environment, use the following command:

conda activate myenv

Replace myenv with the name of your new environment.

You should see the name of the environment printed in your terminal or command prompt, indicating that you're now working in that environment.

Deactivating the environment

To deactivate the environment and return to your base environment, use the following command:

conda deactivate

This will return you to your base environment, where you can continue working as usual.

That's it! You've successfully created a new environment in Anaconda.