【问题标题】:ModuleNotFoundError: No module named 'connections'ModuleNotFoundError:没有名为“连接”的模块
【发布时间】:2020-06-20 16:29:55
【问题描述】:

我正在使用 pybrain 库。当我导入时

from pybrain.structure import SigmoidLayer

我得到了错误

ModuleNotFoundError: No module named 'connections'

我对 pybrain 的安装很困惑。我正在使用 python 3.6 和 windows 10。

【问题讨论】:

    标签: python installation connection structure pybrain


    【解决方案1】:

    您是如何安装 pybrain 的,您使用的是哪个版本的 python?

    当我使用 pip3 安装它并尝试时

    from pybrain.structure import SigmoidLayer
    

    我得到了和你一样的错误,然后我尝试通过 pip3 安装连接。 这会因连接中的语法错误而失败。

    然后我用python2试了一下:

    pip2 install pybrain connections scipy
    

    这行得通。

    所以如果你使用的是 python2,你只需要这个:

    pip install connections
    

    【讨论】:

    • 我使用的是 python 3.6。我使用了 'pip install pybrain' 这个命令
    • github.com/operetta/connections/issues/1 似乎是连接模块的问题。您可以从 github 下载它,在问题中进行更改,然后使用 pip 手动安装它(或者只是将文件放在项目目录中)。
    猜你喜欢
    • 2019-03-28
    • 2022-01-07
    • 2017-12-14
    • 2020-12-10
    • 2021-09-02
    • 2020-10-10
    • 2022-01-06
    • 2021-09-10
    相关资源
    最近更新 更多