最近打算在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.

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

原因为无法加载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

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

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

 再次运行,可正常调试。


参考:点击打开链接

相关文章:

  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2021-10-29
  • 2021-06-23
  • 2021-10-30
  • 2021-06-02
猜你喜欢
  • 2021-06-01
  • 2021-04-03
  • 2021-11-27
  • 2022-12-23
相关资源
相似解决方案