新创建的conda envs是否从基本env继承所有软件包? [英] Do newly created conda envs inherit all packages from the base env?
问题描述
我安装了Anaconda并创建了一个新的env("dell_proj").然后,我用新环境在皮查姆创建了一个新项目.我的期望是,我只能在该特定环境中通过Conda安装的项目中使用程序包,但是,我可以使用在Base环境中安装的所有程序包.
I installed Anaconda and created a new env ("dell_proj"). Then I created a new Project in Pycharm with my new environment. My expectation was that I would only be able to use packages in this project that I installed through Conda in that specific env, however, I am able to use all packages that were installed in the Base environment.
有人可以在这里解释我的误会吗?
Could somebody explain what I'm misunderstanding here?
推荐答案
您可以使用以下方法创建基本环境的克隆
conda create --name dell_proj --clone root
.这将创建一个新环境,它是您的基本环境的副本.
You can create a clone of the base environment using
conda create --name dell_proj --clone root
. This will create a new environment that is a copy of your base environment.
如果您使用conda create --name dell_proj
之类的东西创建了新环境,它将不会从基本环境中继承程序包.您必须使用conda install
安装所需的软件包.
If you created the new environment using something like conda create --name dell_proj
, it will not inherit packages from the base environment. You would have to install the packages you want using conda install
.
这篇关于新创建的conda envs是否从基本env继承所有软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!