Pybrain 不支持 Python 3.6.1

Pybrain not working with Python 3.6.1

我安装了 Python 3.6.1。然后使用 git 安装 pybrain(参见屏幕截图)。然后,当我使用 import pybrain 时,它会起作用,但之后当我使用 from pybrain.tools.shortcuts import buildNetwork 时,它会给我错误消息:Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information.

>>> import pybrain

>>> from pybrain.tools.shortcuts import buildNetwork
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
    from pybrain.tools.shortcuts import buildNetwork
File "C:\Users\davm5\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pybrain\tools\shortcuts.py", line 14
    except ImportError, e:
SyntaxError: invalid syntax.

>>> from pybrain.structure import TanhLayer
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
    from pybrain.structure import TanhLayer
File "C:\Users\davm5\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pybrain\structure\__init__.py", line 1, in <module>
    from connections.__init__ import *
ModuleNotFoundError: No module named 'connections'

为什么会这样?请在这里帮助我。谢谢

编辑:排除屏幕截图。根据要求在 post 中添加了所有内容。

except ImportError, e 是 Python 2 语法,您已尝试 运行 代码 Python 3. 安装最新版本 — 代码似乎已修复在 git 中(现在是 except ImportError as e,因此它适用于 Python 2.7 和 Python 3)。

只是一个更新:我能够通过卸载 python,然后使用 pip3 (pip3 install pybrain) 安装 python 3.6.2(64 位)来解决问题我能够安装完美运行的最新版本的 pybrain。感谢在我刚接触 python 时尝试帮助我的所有人。喜欢这个社区!!