Skip to content Skip to sidebar Skip to footer

How To Run Tensorflow Gpu In Pycharm?

I want to run Tensorflow GPU in Pycharm on Linux Mint. I tried some guides like these https://medium.com/@p.venkata.kishore/install-anaconda-tenserflow-gpu-keras-and-pycharm-on-wi

Solution 1:

First Make sure CUDA and CuDNN has been installed successfully and Configuration should be verified.

CUDA driver version should be sufficient for CUDA runtime version.

Once done, Open PyCharm

Goto File->Settings-> Project Interpreter

Select the appropriate Environment which has tensorflow-gpu installed

Select Run->Edit Configuration->Environment Variables

Since the code is searching for libcublas.so.10.0 ,

Assume like path you find "libcublas.so.10.0" is something like "/home/Alex/anaconda3/pkgs/cudatoolkit-10.0.130-0/lib/"

Add the lib path as LD_LIBRARY_PATH in environment variables as

Name : LD_LIBRARY_PATH

Value : /home/Alex/anaconda3/pkgs/cudatoolkit-10.0.130-0/lib/

Save it and then try to import tensorflow

Solution 2:

It's kind of confusing in your installment, Do you install the tensorflow in your pycharm or anaconda, because you use pycharm, but there are some error about the anaconda.

  1. Check the environment variable configuration, both for Linux and pycharm. Be careful the cuda-x in the path. x is the version cuda such as 10.0
  2. Check the versions of the tensorflow, cuda, cudnn, according to this site.
  3. Make sure you can find the libcublas.so.10.0 in this folder /usr/local/cuda-10.0/lib64. If not, you should reinstall the cudnn.
  4. Sometimes I encounter this problem, but after restarting the computer, it works.

Post a Comment for "How To Run Tensorflow Gpu In Pycharm?"