theano import error (win10 python2.7)

因为项目需要,在win10-64位电脑上配置theano.
但是一直有 import error的错误,找不到解决方法。
作为一个python新手,实在搞不定,请大家不吝赐教!小女子不胜感激!

按照网上的教程,安装了anaconda2, 版本是4.2.0;
conda install mingw libpython安装了mingw libpython;mingw版本是4.7,libpython版本是2.0
修改了系统的环境变量如下:

在系统变量中添加了PYTHONPATH 变量值为 E:AnacondaLibsite-packagestheano

在cmd窗口的起始目录下,新建了 .theanorc.txt 文件(按照教程来的)

在cmd窗口里输入pip install theano安装了theano,版本是0.9.0

在cmd中打开python,输入:import theano 之后出现错误提示信息:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named theano

然后我在Spyder的Ipython console中输入:import theano
出现了不一样的import error:
Traceback (most recent call last):
File "<ipython-input-1-3397704bd624>", line 1, in <module>

import theano

File "E:Anacondalibsite-packagestheano__init__.py", line 66, in <module>

from theano.compile import (

File "E:Anacondalibsite-packagestheanocompile__init__.py", line 10, in <module>

from theano.compile.function_module import *

File "E:Anacondalibsite-packagestheanocompilefunction_module.py", line 18, in <module>

from theano import config, gof

ImportError: cannot import name gof
如图:

有人说可能是存在多个版本的theano,但我只安装过这个版本。
用pip uninstall theano卸载了之后,又pip install theano,还是没有解决这个问题。
有人说是因为有cygwin和Mingw,cygwin的环境变量path还在mingw之前,可我并没有cygwin这个包。
总之试了一些方法,仍然解决不了我的问题。

不知该怎么解决,希望大家给些帮助,谢谢!

theano import error (win10 python2.7) >> python

这个答案描述的挺清楚的:
http://www.goodpm.net/postreply/python/1010000008982858/theanoimporterrorwin10python27.html

时间: 2024-08-04 07:34:13

theano import error (win10 python2.7)的相关文章

MITMF使用import error

安装问题: 1.ubuntu 14.04.安装使用capstone时候,提示出现import error:ERROR: fail to load the dynamic library. 解决方法:将/usr/lib64/libcapstone*复制到capstone.py同一个目录下即可. mv /usr/lib64/libcapstone* /usr/lib/python2.7/dist-package/capstone 2.没有dns.resolver模块. pip install dns

Flask and uWSGI - unable to load app 0 (mountpoint=&#39;&#39;) (callable not found or import error)

Here is my directory structure: -/path/to/folder/run.py -|app -|__init__.py -|views.py -|templates -|static Contents of /path/to/folder/run.py if __name__ == '__main__': from app import app #app.run(debug = True) app.run() Contents of /path/to/folder

uwsgi启动Django项目时:unable to load app 0 (mountpoint=&#39;&#39;) (callable not found or import error) *** no app loaded. going in full dynamic mode ***

说起来有点坑 用命令都能正常启动,但是用配置文件就是不行 提示 unable to load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in full dynamic mode *** 最后准备睡觉了了,无意间解决了 uwsgi.ini文件的wsgi模块是这样写的,一直报错,网上的都找遍了还是没解决 module = AutoTestSite.wsgi:applicati

Import Error:cannot import name main解决方案

在Ubuntu上安装软件,不小心升级了pip,导致使用时报错如下: Import Error:cannot import name main 后来发现是因为将pip更新为10.0.0后库里面的函数有所变动造成这个问题. 解决方法如下: sudo vi /usr/bin/pip 将原来的 from pip import main 改为 from pip._internal import main 方法二: sudo vi /usr/bin/pip 将原来的: from pip import mai

Import Error: _openmp_helps :找不到指定的模块

在利用python学习机器学习时, from sklearn.linear_model import LinearRegression会弹出:Import Error: _openmp_helps :找不到指定的模块. 原因就是:我们没有安装numpy+mkl.whl依赖包.只要找到numpy+mkl.whl依赖包安装就ok了. 原文地址:https://www.cnblogs.com/ray-blog/p/12173125.html

Eclipse&#39;s Import error and remove

1.导入项目之前,请确认工作空间编码已设置为utf-8:window->Preferences->General->Wrokspace->Text file encoding->Other 选择UTF-8. 2.导入后,由于你的开发环境中JRE以及Tomcat Library名称可能和源代码中的不一致,可能会出现Build Path的错误,解决方法如下:右键project->Build Path->Configure Build Path->Java Bui

python 3.5 import theano ::hypot error

# win10 , mingw(nuwen,g++ 6.3), python 3.5 , 描述: import theano 时生成动态的 mod.cpp ,然后编译库的时候报 ::hypot 未定义 原因: hypot 在"C:\Program Files\Python35\include\pyconfig.h"被重定义了 pyconfig.h ------------------------------------------- #define hypot _hypot -----

Import error in Django

when i try to give the environment variable "DJANGO_SETTINGS_MODULE" a path, for example, DJANGO_SETTINGS_MODULE=mysite_settings, DJANGO_SETTINGS_MODULE=/home/wgz/my_project/mysite/mysite.settings, then i type the command "python3 manage.py

Python备份脚本(Win10+Python2.7+PyCharm)

说一下程序来源,是从<Python简明教程>上面看到的程序,试了一下之后,居!然!不!行!!! Google了老半天,也看了好多个博客,也未能解决. 除了一些基本语法问题.字符串中队'\'的处理的问题等之外,此处假设程序本身没什么问题了,主要是zip_command这个指令出现的问题.其中最常见的问题就是zip不是什么内部指令的那个了,如下图: 先说一下我的解决方法,是从万能的知乎上找到的方案,话不多说,直奔重点. 下了一个7-zip的软件,安装一下,要记住你的安装路径! 先贴代码吧,如下所示