I have a conda environment named old_name
, how can I change its name to new_name
without breaking references?
You can't.
One workaround is to create clone environment, and then remove original one:
(remember about deactivating current environment with deactivate
on Windows and source deactivate
on macOS/Linux)
conda create --name new_name --clone old_name
conda remove --name old_name --all # or its alias: `conda env remove --name old_name`
There are several drawbacks of this method:
--offline
flag to disable it,There is an open issue requesting this feature.