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

 再次运行,可正常调试。


参考:点击打开链接

猜你喜欢

转载自blog.csdn.net/qq_34654240/article/details/80480849