0

I am trying to run theano on Enthought Python Distribution (academic license) under windows 7 64. Followin the topic Installing Theano on EPD (Windows x64) I installed bleeding edge version of theano since I got the same error. But now I have this problem:

WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU). 

EPD installs its own version of mingw, so I do not uderstand why the problem occurs. I tried to find g++ (assuming EPD installed it) through window search to put in PATH but there is nothing.

I've separatly installed mingw64, but when I type in command prompt

import theano

it's hanging

Thanks in advance.

Community
  • 1
  • 1
Gennady
  • 31
  • 1
  • 3

4 Answers4

0

The problem was that I installed Enthought Canopy and it does not contain mingw. The issue can be solved by installing Enthought Python Distribution. Following CUDA linking error - Visual Express 2008 I created vcvars64.bat in c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\ to avoid nvcc fatal : Visual Studio configuration file '(null)' error. But now I get this exception:

c:\program files (x86)\microsoft visual studio 10.0\vc\include\codeanalysis\sourceannotations.h(29): error:  invalid redeclaration of type name "size_t"
Community
  • 1
  • 1
Gennady
  • 31
  • 1
  • 3
0

I solved this problem by adding Visual C++ Compilers feature to my current VS2010 installtion. Now I can import theano and console shows that I use gpu

>>import theano
Forcing DISTUTILS_USE_SDK=1
Using gpu device 0: GeForce GT 630M

But when I am trying to run this code:

from theano import function, config, shared, sandbox
import theano.tensor as T
import numpy
import time

vlen = 10 * 30 * 768  # 10 x #cores x # threads per core
iters = 1000

rng = numpy.random.RandomState(22)
x = shared(numpy.asarray(rng.rand(vlen), config.floatX))
f = function([], T.exp(x),mode='DebugMode')

I get NVCC: nvcc : fatal error : Could not set up the environment for Microsoft Visual Studio using 'c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/../../VC/bin/amd64/vcvars64.bat

Gennady
  • 31
  • 1
  • 3
0

The problem isn't with Theano, but with nvcc. For Theano to use the GPU, it need a working nvcc installation. But it is not the case currently.

To help you fix this problem, try to compile nvcc example. They will also fail. When you fix this problem, Theano will work. For this, check nvcc installation/tests documentations.

I suspecct that you didn't used the right microsoft compiler version. nvcc don't accept version of msvc.

nouiz
  • 5,071
  • 25
  • 21
  • Thanks for the answer. Yes, it seems I used compiler for win32.Now I can even run example [Testing Theano with GPU](http://deeplearning.net/software/theano/tutorial/using_gpu.html). But if fails when running [Convolution example](http://deeplearning.net/tutorial/lenet.html) I get this [error](https://gist.github.com/altus88/5798521). I don't have any ideas ( – Gennady Jun 17 '13 at 17:19
0

Instead of using git command to install Theano try downloading the zip from the theano repository on GitHub. To install theano, use python setup.py install command. Also try using Anaconda distribution to install Python3.4 or older versions. Then use conda install command to install mingw for g++ support.

tauseef_CuriousGuy
  • 770
  • 1
  • 12
  • 28