PyBrain in Anaconda - ImportError: No module named 'structure'

时光总嘲笑我的痴心妄想 提交于 2020-01-24 10:26:25

问题


I'm looking for a way to use numpy, scipy and pybrain in python. If I try to install those I get the error:

Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

I have installed visual studio but it still doesn't work. I have tried setting up an environment with conda including numpy and scipy and then installing pybrain in it using pip but when I try to import it I get the error:

import pybrain
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Lucas\Anaconda3\envs\brain\lib\site-packages\pybrain\__init__.py", line 1, in <module>
    from structure.__init__ import *
ImportError: No module named 'structure'

What should I do?


回答1:


This seems to be an issue with the library when used from Python 3 and installed using pip. The latest version listed is 0.3.3, but I'm still getting v0.3.0 when installing.

Try installing numpy and scipy in Anaconda, then (after activating the conda environment) install directly from the git repo:

pip install git+https://github.com/pybrain/pybrain.git@0.3.3

This did the trick for me.



来源:https://stackoverflow.com/questions/34493217/pybrain-in-anaconda-importerror-no-module-named-structure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!