0

I am trying to install Theano and use the PTVS IDE. After following all installation steps, when running "import theano" within the PTVS interactive window I get:

WARNING (theano.configdefaults): g++ not detected

I believe the problem is caused by missing environment variables since when I run "import theano" through env.bat as described in http://deeplearning.net/software/theano/install_windows.html#configuring-the-environment, I do not get any warnings.

How can I setup the PTVS environment correctly so that theano doesn't complain?

Leo
  • 1,213
  • 2
  • 13
  • 26

2 Answers2

1

Make sure that you have PTVS 2.2 (currently in RC). That version provides a way to specify environment variables in project properties.

Pavel Minaev
  • 99,783
  • 25
  • 219
  • 289
  • Is there a way to run scripts? The mentioned env.bat sets it own environment variables but it also calls two other scripts – Leo May 15 '15 at 07:50
  • I tried to use call from subprocess module and execute the env.bat script, but the problem persists – Leo May 15 '15 at 08:47
  • There's no direct way to run script such that its environment would be preserved afterwards for the actual program. In general, every process has its own environment - it may inherit one from its parent, but any changes that it makes are not propagated back. It's also why `subprocess` didn't work for you. – Pavel Minaev May 15 '15 at 20:34
  • One option is to run VS itself (devenv.exe) from under env.bat. That way it will have those environment variables around, and when it starts debugging, it will propagate them to the debugged process. – Pavel Minaev May 15 '15 at 20:35
  • Another option is to write your own batch file that calls env.cmd first, and then runs python.exe, passing it all the arguments. And then register that batch file as a custom Python interpreter in PTVS. – Pavel Minaev May 15 '15 at 20:36
0

I have the same problem. And turns out that i run the Blend version of the Visual Studio 2015, instead of the normal version. Hope this helps.

QuartZ
  • 154
  • 3
  • 12