how to create conda virtual environment code example

Example 1: conda create environment python 3.6

conda create -n myenv python=x.x

Example 2: 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 3: create a virtual environment python conda

conda create -n yourenvname python=x.x anaconda

Example 4: conda env

conda create -n myenv python=3.6

Example 5: conda list environments

conda info --envs

Example 6: anaconda clone environment

conda create --name myclone --clone myenv

Tags: