0

I am running this code on IPython. I am facing this issue. I will be thankful for suggestions or help to solve this issue.

I am using theano as a backend

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

Nuageux
  • 1,668
  • 1
  • 17
  • 29

1 Answers1

0

For g++ compilers, I had to install MinGW from here (version without git).

Then add its "bin" dir to the PATH environment var. Normally it's the C:\MinGW\bin folder, or where you installed it.

(In case you have a g++ compiler already installed, add it's path to the environment var)

After that, if an error about hypot appears, you add this to a file named .theanorc, normally in C:\Users\yourUser. (Save it with notepad if you can't create it via windows explorer).

[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:

Community
  • 1
  • 1
Daniel Möller
  • 84,878
  • 18
  • 192
  • 214