[英]How to import one modules from 'base' environment to 'tf' environment in anaconda?
I have been working with base
environment in anaconda
till now and had installed all the required python modules/libraries.到目前为止,我一直在
anaconda
中使用base
环境,并安装了所有必需的 python 模块/库。 When I tried to install tensorflow-cpu
, I came to know that I have to create another environment to install it from official documentation of anaconda
.当我尝试安装
tensorflow-cpu
时,我才知道我必须从anaconda
的官方文档中创建另一个环境来安装它。 Now I have created the new environment named 'tf' to install tensorflow-cpu
.现在我创建了名为 'tf' 的新环境来安装
tensorflow-cpu
。 Since I can activate only one environment at a time, I don't want want to install all the python modules/libraries again to this new tf
environment as it will consume space in memory.由于我一次只能激活一个环境,我不想将所有 python 模块/库再次安装到这个新的
tf
环境中,因为它会占用 memory 中的空间。
Is there any way, I can use all the modules of base
environment to tf
environment or vice versa?有什么办法,我可以将
base
环境的所有模块用于tf
环境,反之亦然? Please help in this context!请在这种情况下提供帮助!
It's definitely not a good idea too mix envs.混合环境绝对不是一个好主意。 They were invented to separate dependencies for independent projects.
它们被发明来分离独立项目的依赖关系。 Trying to mix them is a "wrong" way of using envs.
尝试混合它们是使用环境的“错误”方式。
Also, you don't have to create a new env when installing tf
as the docs say, just install it where you want it to be, everything will work just fine.此外,在安装
tf
时,您不必像文档中所说的那样创建新的环境,只需将其安装在您想要的位置,一切都会正常工作。 The docs recommend you to create one because it's not a good idea to install it into base
env.文档建议您创建一个,因为将其安装到
base
环境中不是一个好主意。
tf
now.tf
的环境。 Activate it and install all dependencies you need, then use it in your project.base
env with packages, this one is not supposed to be used for development, rather for conda itself.base
环境,这个不应该用于开发,而是用于 conda 本身。 Create a new env when you start a new project
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.