anaconda new environment code example

Example 1: conda remove environment

conda remove --name myenv --all

Example 2: anaconda create environment python version

conda create -n myenv python=3.6

Example 3: conda create environment based on requirements.txt

# using pip
pip install -r requirements.txt

# using Conda
conda create --name <env_name> --file requirements.txt

Example 4: create an environment in conda

conda create --name myenv

Example 5: delete conda environment

conda remove --name myenv --all

Example 6: conda install from yaml

conda env update -n my_env --file ENV.yaml