Create new environment in anaconda prompt

To create a new environment in Anaconda Prompt, you can follow these steps:

Method 1: Using conda create command

  1. Open Anaconda Prompt.
  2. Type the following command and press Enter:
    conda create --name myenv

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

Method 2: Using conda env command

  1. Open Anaconda Prompt.
  2. Type the following command and press Enter:
    conda env create --name myenv

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

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".

In all cases, Anaconda will create a new environment with the specified name. You can then activate the environment using the following command:

conda activate myenv

Replace myenv with the name of your new environment.

Note: If you are using Anaconda 4.6 or later, you can use the conda activate command to activate the environment. If you are using an earlier version of Anaconda, you can use the source activate command instead.

Once you have activated the environment, you can install packages and run your code using the packages installed in this environment. To deactivate the environment, use the following command:

conda deactivate

This will return you to the base environment.