我有一个名为 old_name 的 conda 环境,如何在不破坏引用的情况下将其名称更改为 new_name?
I have a conda environment named old_name, how can I change its name to new_name without breaking references?
你不能.
一种解决方法是 create 克隆一个新环境,然后 删除原来的那个.
One workaround is to create clone a new environment and then remove the original one.
首先,请记住停用您当前的环境.您可以使用以下命令执行此操作:
First, remember to deactivate your current environment. You can do this with the commands:
停用(在 Windows 上)或source deactivate 在 macOS/Linux 上.deactivate on Windows orsource 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`
注意这种方法有几个缺点:
Notice there are several drawbacks of this method:
--offline 标志来禁用它)有一个开放的问题请求此功能.
There is an open issue requesting this feature.
这篇关于如何重命名 conda 环境?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何在 conda 环境中安装 Selenium?How to install Selenium in a conda environment?(如何在 conda 环境中安装 Selenium?)
使用 Anaconda installe 在 Windows 上获取 CUDA 和 CUDNNget the CUDA and CUDNN version on windows with Anaconda installe(使用 Anaconda installe 在 Windows 上获取 CUDA 和 CUDNN 版本)
如何下载适用于 python 3.6 的 AnacondaHow can I download Anaconda for python 3.6(如何下载适用于 python 3.6 的 Anaconda)
使用两个不同的 Python 发行版Using two different Python Distributions(使用两个不同的 Python 发行版)
除了 OSX 上现有的 pyenv 安装之外,如何安装 AnaHow can I install Anaconda aside an existing pyenv installation on OSX?(除了 OSX 上现有的 pyenv 安装之外,如何安装 Anaconda?)
在 Cygwin 中为 Anaconda 永久设置 Python 路径Permanently set Python path for Anaconda within Cygwin(在 Cygwin 中为 Anaconda 永久设置 Python 路径)