Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhanwenchen/1c3a78896b8914a9dfa5caa5b20a88f9 to your computer and use it in GitHub Desktop.
Save zhanwenchen/1c3a78896b8914a9dfa5caa5b20a88f9 to your computer and use it in GitHub Desktop.
How to rename a conda environment (workaround)
#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 --offline #use --offline flag to disable the redownload of all your packages
conda remove --name old_name --all # or its alias: `conda env remove --name old_name`
#There are several drawbacks of this method:
# time consumed on copying environment's files,
# temporary double disk usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment