[official document] create a virtual environment in the directory specified by Anaconda

Time:2021-7-30

You can create a virtual environment in the specified directory by specifying a path. For example, the following command will create a virtual environment called./envsAnd follow the packages of these later versions:
conda create --prefix ./envs jupyterlab=0.35 matplotlib=3.1 numpy=1.16

Then, in the current working directory, you can use the name of the virtual environment, that is./envsActivate environment:
conda activate ./envs