【问题标题】:Installing theano on Windows 7 x64 (cannot import name gof)在 Windows 7 x64 上安装 theano(无法导入名称 gof)
【发布时间】:2017-04-02 23:53:11
【问题描述】:

我正在尝试在我的 Windows 7 x64 机器上安装 Theano。我遵循了大约 5 个不同的教程来尝试正确安装它。其中一些在这些链接中:

http://deeplearning.net/software/theano/install_windows.html

https://www.kaggle.com/c/otto-group-product-classification-challenge/forums/t/13973/a-few-tips-to-install-theano-on-windows-64-bits

在 Kaggle 网站上,我尝试了 Anaconda 和 WinPython 的建议……我尝试过使用 Python 2.7 和 3.5……我做什么似乎并不重要;我在运行时不断收到以下错误

import theano

在我的python环境中:

...
^~~~~;mingw-w64/x86_64-6.2.0-posix-seh-rt_v5-rev1/mingw64/lib/gcc/x86_64-w64-mingw32/6.2.0/include/c++/cmath:1133:11: error: '::hypot' has not been declared\mod.cpp:1:/c++/math.h:36:0,

这是我第一次尝试导入 theano 时得到的。如果我在同一会话中再次尝试,我会得到

...
from theano import config, gof

ImportError: cannot import name gof

我发现this other question on stackoverflow 似乎是我安装了旧版本的 Theano 导致了问题。我已经跑了

pip uninstall theano

它不再安装。还有其他方法可以卸载我缺少的吗?还是我有其他问题?

【问题讨论】:

    标签: python windows installation theano


    【解决方案1】:

    我遇到了同样的问题:ImportError: cannot import name gof 适用于 Windows 10 64 位,Python 2.7。我通过多次更新 conda 来确保没有更多更新来解决。我跑:

    1. conda 更新 conda
    2. conda 更新 --all

    之后在Anaconda提示shell的Python环境中,

    1. 导入theano

    【讨论】:

      【解决方案2】:

      我在这里解决了我自己的问题。如果有其他人遇到此问题,我执行了以下操作来解决它

      1. 删除所有你能找到的 Theano 版本; pip uninstall theanoconda remove theano,并在您的文件系统中搜索可能存在的 Theano 文件
      2. 我的机器上还有几个版本的 mingw。删除所有这些;我从标准的窗口卸载开始。我还能够在我的文件系统中找到另一个安装,该安装包含我运行的单独卸载包。
      3. 完全按照this link 的第二个帖子中的说明进行操作

      【讨论】:

        猜你喜欢
        • 2015-10-05
        • 2012-05-03
        • 1970-01-01
        • 2013-03-13
        • 2012-02-10
        • 1970-01-01
        • 1970-01-01
        • 2016-02-14
        • 1970-01-01
        相关资源
        最近更新 更多