0

I've been trying to connect my GPU to tensorflow, but I've been running into this problem. Whenever I run print("gpus:", len(tf.config.list_physical_devices('GPU'))) in the command line (after setting appropriate path variables), I get the desired output.

However, when I run the same thing in pycharm, I get this error Could not load dynamic library 'cudnn64_8.dll'; dlerror: cudnn64_8.dll not found, and then it doesn't find my GPU.

How can I solve this? Also, is there any way to avoid resetting path variables every time I close the command line?

  • To set the environment variables [see this post](https://stackoverflow.com/q/43112945). There are [several way to do it](https://stackoverflow.com/search?q=%5Bpycharm%5D+environment+variables) depending on the setup you want, it can be per project or OS wide. – bad_coder Oct 04 '21 at 10:11

0 Answers0