Create a virtual environment
- Do not specify a path:
The path to the virtual environment is managed separately from the main Anaconda installation directory. By default, Anaconda installs the virtual environment in the .conda\envs folder instead of the main Anaconda installation directory.
For exampleC:\Users\username\.conda\envs\tfenv16
conda create -n envname python=2.7
- Specify path:
Specify the installation path of the virtual environment. You can omit the -n option and use the -p option directly. At this time, the name of the virtual environment will be automatically generated based on the specified installation path.conda create -p E:\anaconda3\envs\tfenv16 python=2.7
Activate virtual environment
activate tfenv16
Exit the virtual environment
deactivate
Delete virtual environment
Exit first, then:
conda env remove -n tfenv16
View virtual environment
conda env list
or
conda info --envs
Check the anaconda installation environment
conda info --base