2017-05-19 120 views
0

我在IPython上运行这段代码。我面临这个问题。我会感谢建议或帮助解决这个问题。g ++。exe:错误:没有这样的文件或目录

我使用theano作为后端

import numpy 
from keras.datasets import imdb 
from matplotlib import pyplot 
from pylab import * 

# load the dataset 

(X_train, y_train), (X_test, y_test) = imdb.load_data() 
X = numpy.concatenate((X_train, X_test), axis=0) 
y = numpy.concatenate((y_train, y_test), axis=0) 

g++.exe: error: Amjad\AppData\Local\Theano\compiledir_Windows-10-10.0.15063-SP0-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-3.5.3-64\lazylinker_ext\lazylinker_ext.pyd: No such file or directory g++.exe: error: Amjad\AppData\Local\Theano\compiledir_Windows-10-10.0.15063-SP0-Intel64_Family_6_Model_58_Stepping_9_GenuineIntel-3.5.3-64\lazylinker_ext\mod.cpp: No such file or directory

回答

0

对于G ++编译器,我不得不从here(版本没有GIT)安装MinGW的。

然后将其“bin”目录添加到PATH环境变种。通常它是C:\MinGW\bin文件夹或您安装它的位置。

(如果你已经安装了G ++编译器,加上它的路径环境变量)

之后,如果有关hypot一个错误出现后,您添加到一个名为.theanorc文件,通常C:\Users\yourUser。 (如果你不能通过Windows资源管理器创建它,请用记事本保存)。

[gcc] 
cxxflags = -D_hypot=hypot 

Always avoid installing anything in folders with spaces in their names! Theano won't recognize those folders and will bring errors. If you have problems with that, you can see these:

相关问题