win10, Anaconda python2.7集成包环境下配置theano,在确定各类配置文件没问题的情况下还碰上
Python.h: No such file or directory theano
或者缺失patchlevel.h 等等 .h 文件的话,先看看你.theanorc.txt文件中配置的 cxxflags=-I 地址中有无所要求的文件,比如我的配置是
cxxflags=-I"F:\Anaconda\MinGW\x86_64-w64-mingw32\include"
(这个地址看网上有很多版本,包括有无引号,我个人是这样弄的)
然后发现python.h并不在其中,好像发现了问题的源头....
解决方案:
找到对应版本、官方python的安装目录下的Include文件夹,比如
F:\python2.7\include
把里面的.h文件扔到 cxxflags=-I后面的地址里。
没有官方版本的?自己去下呗。
最后大功告成!


网友评论