刚刚完成张量流程的安装(gpu enable)1.5在Clevo笔记本电脑上,使用nvidia 1060 gpu在linux mint 18.3下运行测试程序时python premade_estimator.py我得到以下错误代码:
Traceback (most recent call last):
File "premade_estimator.py", line 20, in <module>
import tensorflow as tf
File "/home/empereur/tensorflow/local/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/empereur/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/empereur/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/empereur/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/empereur/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/empereur/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
我安装了cuda驱动程序9.0,如下所示:
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176
我看一下论坛,大多数问题都是两个版本之间的冲突(不是我的情况)或版本9.0的路径没有完成(我认为我做过)
我对此有点新手,所以非常感谢帮助
如果缺少任何信息,请询问,我会提供信息(但请,我是新手,所以让我知道如何通过命令行获取信息)
这是usr / local /
的内容empereur @ empereur-Sky-X4C~ $ ls / usr / local / bin cuda
cuda-9.1游戏lib sbin src兄弟cuda-9.0等
包括男人分享
以下是usr / local / cuda / lib64 libaccinj64.so
的内容empereur @ empereur-Sky-X4C~ $ ls / usr / local / cuda / lib64 libaccinj64.so libcusparse.so.9.1.85 libnppist.so.9.1.85 libaccinj64.so.9.1
libcusparse_static.a libnppist_static.a libaccinj64.so.9.1.85 libnppc.so libnppisu.so libcublas_device.a
libnppc.so.9.1 libnppisu.so.9.1 libcublas.so
libnppc.so.9.1.85 libnppisu.so.9.1.85 libcublas.so.9.1
libnppc_static.a libnppisu_static.a libcublas.so.9.1.128
libnppial.so libnppitc.so libcublas.so.9.1.85
libnppial.so.9.1 libnppitc.so.9.1 libcublas_static.a
libnppial.so.9.1.85 libnppitc.so.9.1.85 libcudadevrt.a
libnppial_static.a libnppitc_static.a libcudart.so
libnppicc.so libnpps.so libcudart.so.9.1
libnppicc.so.9.1 libnpps.so.9.1 libcudart.so.9.1.85
libnppicc.so.9.1.85 libnpps.so.9.1.85 libcudart_static.a
libnppicc_static.a libnpps_static.a libcufft.so
libnppicom.so libnvblas.so libcufft.so.9.1
libnppicom.so.9.1 libnvblas.so.9.1 libcufft.so.9.1.85
libnppicom.so.9.1.85 libnvblas.so.9.1.128 libcufft_static.a
libnppicom_static.a libnvblas.so.9.1.85 libcufftw.so
libnppidei.so libnvgraph.so libcufftw.so.9.1
libnppidei.so.9.1 libnvgraph.so.9.1 libcufftw.so.9.1.85
libnppidei.so.9.1.85 libnvgraph.so.9.1.85 libcufftw_static.a
libnppidei_static.a libnvgraph_static.a libcuinj64.so
libnppif.so libnvrtc-builtins.so libcuinj64.so.9.1
libnppif.so.9.1 libnvrtc-builtins.so.9.1 libcuinj64.so.9.1.85
libnppif.so.9.1.85 libnvrtc-builtins.so.9.1.85 libculibos.a
libnppif_static.a libnvrtc.so libcurand.so libnppig.so libnvrtc.so.9.1 libcurand.so.9.1 libnppig.so.9.1
libnvrtc.so.9.1.85 libcurand.so.9.1.85 libnppig.so.9.1.85
libnvToolsExt.so libcurand_static.a libnppig_static.a
libnvToolsExt.so.1 libcusolver.so libnppim.so
libnvToolsExt.so.1.0.0 libcusolver.so.9.1 libnppim.so.9.1
libOpenCL.so libcusolver.so.9.1.85 libnppim.so.9.1.85
libOpenCL.so.1 libcusolver_static.a libnppim_static.a
libOpenCL.so.1.0 libcusparse.so libnppist.so
libOpenCL.so.1.0.0 libcusparse.so.9.1 libnppist.so.9.1 stubs
答案 0 :(得分:1)
感谢大家的帮助,所以我不小心安装了cuda 9.1(需要9.0)。我没有具体强制使用cuda-toolkits上的版本。通过清除cuda 9.1和nvidia-cuda-toolkit并重新安装9.0版本来解决我的问题(不正确)。通过遵循laylog
的建议,可能已经解决了一个更干净的方法但是,不是清除9.1,而是指向cuda符号链接指向 CUDA-9.0或更新bashrc中的LD_LIBRARY_PATH指向 CUDA-9.0
再次感谢所有人!