How To Run Tensorflow Gpu In Pycharm?
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.
- 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
- Check the versions of the tensorflow, cuda, cudnn, according to this site.
- 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. - Sometimes I encounter this problem, but after restarting the computer, it works.
Post a Comment for "How To Run Tensorflow Gpu In Pycharm?"