I have set up an environment in anaconda and installed additional packages in it (mainly pybrain).
我在anaconda中设置了一个环境并在其中安装了额外的包(主要是pybrain)。
How can I access the environment's modules and packages? Can those be imported from a python script? If so, how?
如何访问环境的模块和包?那些可以从python脚本导入吗?如果是这样,怎么样?
I searched the documentation but did not find the answer.
我搜索了文档,但没有找到答案。
1 个解决方案
#1
2
If you have an environment created with conda
, you need to activate it.
如果您使用conda创建了环境,则需要激活它。
On Windows:
activate myenv_name
Other platforms:
source activate myenv_name
Replace myenv_name
with name of your environment.
将myenv_name替换为您的环境名称。
If you don't have such an environment skip this step.
如果您没有这样的环境,请跳过此步骤。
Install pybrain
with:
安装pybrain:
pip install pybrain
Now you can use it.
现在你可以使用它了。
#1
2
If you have an environment created with conda
, you need to activate it.
如果您使用conda创建了环境,则需要激活它。
On Windows:
activate myenv_name
Other platforms:
source activate myenv_name
Replace myenv_name
with name of your environment.
将myenv_name替换为您的环境名称。
If you don't have such an environment skip this step.
如果您没有这样的环境,请跳过此步骤。
Install pybrain
with:
安装pybrain:
pip install pybrain
Now you can use it.
现在你可以使用它了。