0

I am trying to use Keras to develop a Neural Network in Python, after managing to install on my Windows 10 Workstation Anaconda3 (with all its libraries: numpy, scikit-learn, pandas, SciPy and matplotlib), I realized to need TensorFlow or Theano, too.

After I failed intalling TensorFlow, I downloaded and was able to install Theano, but trying to import it from the Python prompt, I received the following:

WARNING: "g ++ not detected! Theano will be unable to execute optimized C implementations (for both CPU and GPU) and will default to Python implementations. Performance will be several degraded. To remove this warning, set Theano flags cxx to an empty string"

Hoping in this way to solve the problem, I downloaded the GNU compiler for C++ Cygwin64, but nothing has changed, at all! Acknowledge that this is really the right way to move forward, how should I access the "Theano flags cxx"?

Jacques Gaudin
  • 15,779
  • 10
  • 54
  • 75
  • Can you explain how you installed TensorFlow and Theano? – darthbith Jan 25 '17 at 19:21
  • About TensorFlow I don't rmember. To install Theano I opened CygWin64 Terminal & wrote "pip install Theano". Everything was Ok, at the end of the process... – Francesco Maggiore Jan 25 '17 at 19:33
  • When using conda/Anaconda, you should use `conda install ` generally, especially for packages like Theano and TensorFlow that have compiled C++ libraries. You should run the `conda install` command from the Windows command prompt, not the Cygwin terminal (unless you installed Anaconda in Cygwin). Make sure to run `pip uninstall Theano` before you install using conda. – darthbith Jan 25 '17 at 19:45
  • Possible duplicate of [How do I install theano in Anaconda ver. 2.1 Windows 64 bit for Python 3.4?](http://stackoverflow.com/questions/27629347/how-do-i-install-theano-in-anaconda-ver-2-1-windows-64-bit-for-python-3-4) – devinbost Feb 13 '17 at 21:56

1 Answers1

1

first, its only performance issue to run theano without g++. it a warning and not exception when importing it.

BUT probably you want performance when using deep learning lib like keras so lets try fix the theano installation.

please follow the theano docs about installing theano on windows. you might want to clean previous installation of requirements.

to install the gcc follow this section which says:

Theano C code compiler currently requires a GCC installation. We have used the build TDM GCC which is provided for both 32- and 64-bit platforms...

download from here follow the installation instruction.

Tensorflow

I recommending working with tensorflow as keras recently changed the default backend from theano to tensorflow.

using anaconda and pip you should easily do pip install tensorflow and it will work.

actually today I just installed keras and tensorflow on windows 10 using anaconda by just running pip install keras tensorflow so I suggest you try fresh clean installation of anaconda and python and try this again.

please update if you succeed or having another issues installing theano / tensorflow / keras

ShmulikA
  • 3,468
  • 3
  • 25
  • 40
  • Thanks a lot! Doing what you have written (but launching the Anaconda prompt with Administrator privilege!) I had the following results: (1) Successfully installed protobuf-3.1.0.post1 tensorflow-0.12.1; (2) Successfully built keras Installing collected packages: theano, keras Successfully installed keras-1.2.1 theano-0.8.2 – Francesco Maggiore Jan 27 '17 at 17:45
  • great, consider approving the answer or adding more info if the issue is still not fixed – ShmulikA Feb 03 '17 at 09:52