pycharm远程调试ImportError:libcusolver.so.8.0: cannot open shared object file: No such file or directory

最近打算在win系统下使用pycharm开发程序,并远程连接服务器调试程序,其中在import tensorflow时报错如图所示(在远程服务器中执行程序正常):

直观错误为:

ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory

Failed to load the native TensorFlow runtime.

原因为无法加载libcusolver.so等,查看远程服务器LD_LIBRARY_PATH环境变量,已经设置了文件路径/usr/local/cuda/lib64(从远程服务器正常import知道,这点配置是没问题的)。

解决:在edit configurations中配置python运行环境变量,添加LD_LIBRARY_PATH,设置路径/usr/local/cuda/lib64

pycharm远程调试ImportError:libcusolver.so.8.0: cannot open shared object file: No such file or directory_第1张图片

pycharm远程调试ImportError:libcusolver.so.8.0: cannot open shared object file: No such file or directory_第2张图片

pycharm远程调试ImportError:libcusolver.so.8.0: cannot open shared object file: No such file or directory_第3张图片

 再次运行,可正常调试。


参考:点击打开链接

你可能感兴趣的:(tensorflow)