My conda version is 4.7.11. I am trying to clone the base env to a new one so I can install some specific packages and will not mess up the base environment. I tried as some other answers suggested:
conda create --name <myenv> --clone base
and
conda create --name <myenv> --clone root
But none of them works. The message from terminal is "The system cannot find the file specified".
Below is my cuurent env list:
base * D:\LabTest\Dave\Anaconda
dlc-windowsCPU D:\LabTest\Dave\Anaconda\envs\dlc-windowsCPU
dlc-windowsGPU D:\LabTest\Dave\Anaconda\envs\dlc-windowsGPU
dlc-windowsGPU-dave D:\LabTest\Dave\Anaconda\envs\dlc-windowsGPU-dave
dlc-windowsGPU-yc D:\LabTest\Dave\Anaconda\envs\dlc-windowsGPU-yc
I also cannot clone from my anaconda navigator.
Don't know what to do.
您只需要引用称为base
而不是root
的基本环境:
conda create --name <myenv> --clone base
I would recommend that you try the method as shown on this official documentation . In summary, you can get all the list of modules installed in the virtual environment, save it as a .txt
file, and create a new environment from that .txt
file. For example,
conda list --explicit > spec-file.txt
Then, create a new environment using that specification.
conda create --name myenv --file spec-file.txt
While this is not exactly "cloning" the base environment, you should be able to reproduce a virtual environment identical to the base through this process.
What I usually do when creating new env is the below command:
conda create --clone pytorch --name pytorch1.6
Where pytorch is the environment that I am cloning to pytorch1.6 which I'll be updating to the latest nightly build. My reason for cloning is to avoid configuration of Cuda all over again :) Documentation or rather official cheatsheet lives here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.