Modify the name of the conda virtual environment

Step1: Make sure the virtual environment to be renamed is activated

conda activate old_env

Step2: Change the virtual environment from "old_env" to "new_env"

conda create --name new_env --clone old_env

The above command will create a new virtual environment "new_env" and clone all packages and dependencies of "old_env" into the new environment, which is equivalent to renaming the virtual environment.

Step3: Delete the old virtual environment ("old_env")

conda env remove --name old_env

Guess you like

Origin blog.csdn.net/daydayup858/article/details/131904971