0

I just installed Anaconda and PyCharm on Windows 8.1 (64 bit). For an existing project, i created a conda environment which includes Theano and some other librarires.

Theano is able to use the GPU (with CUDA) or the CPU for its calculations. I prefer to use the GPU, because it is much faster.

If i start a test script of the project in the command line, i get the following output:

Using gpu device 0: GeForce GT 650M (CNMeM is enabled with initial size: 85.0% of memory, cuDNN not available)
...

This is what i like to have as output.

I also tried to do this with PyCharm. I installed it and i used the correct conda environment, but i always get this output:

WARNING (theano.configdefaults): 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 severely degraded. To remove this warning, set Theano flags cxx to an empty string.
WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available  (error: cuda unavailable)
...

Theano then uses the CPU (which is incredibly slow...). In the command line i checked where "g++" is located:

(venv) E:\XXX\panoptes_dl>where g++
C:\Users\XXX\Anaconda2\envs\venv\Scripts\g++.bat

This means the used g++ is inside the Script-directory of the created environment. Sure, i could add the path C:\Users\XXX\Anaconda2\envs\venv\Scripts to the system's path variable, but this is very ugly, because i also have to use different environments.

Does someone has an idea how this can be done with PyCharm?

Thank you very much

Regards

Kevin

Kevin Meier
  • 2,339
  • 3
  • 25
  • 52

1 Answers1

-1

I had the same issue on windows with Anaconda env in Pycharm. Go to: File -> Settings -> Project Interpreter

Click on the gear beside the listed project interpreter at the top and select more.

All the interpreters that PyCharm knows about will be listed. Select the environment that you are using and click the bottom button to the right under the filter symbol.

This allows you to add a path to the interpreter paths. If you add your Scripts folder to this list of paths then it will be picked up when running in PyCharm.

PaddyH6
  • 83
  • 1
  • 4