Asked By – pkowalczyk
I have a conda environment named
old_name, how can I change its name to
new_name without breaking references?
Now we will see solution for issue: How can I rename a conda environment?
From Conda 4.14 you will be able to use just:
conda rename -n old_name -d new_name
First, remember to deactivate your current environment. You can do this with the commands:
deactivateon Windows or
source deactivateon 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`
Notice there are several drawbacks of this method:
- It redownloads packages (you can use
--offlineflag to disable it)
- Time consumed on copying environment’s files
- Temporary double disk usage
There is an open issue requesting this feature.