在 Ubuntu 上安装 TensorFlow GPU 时出错
Error installing TensorFlow GPU on Ubuntu
所以我花了一天时间尝试安装 TF GPU,但没有成功。
我已经安装了 CUDA Toolkit 9.0 并尝试了 CuDNN v7.0.3(适用于 CUDA 8 和 9)以及 v6.0。
尝试执行我的演示程序后,终端抛出此消息:
Traceback (most recent call last):
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "twicetwo.py", line 5, in <module>
import tensorflow
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.8.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.
我更新了 LD_LIBRARY_PATH
变量以及 PATH
。
我正在使用 Anaconda,使用 Python 3.6 创建了一个源代码,因为 python --version
放弃了这个版本。
有人可以帮我解决这个问题吗?
我已经 运行 成功了。如果你在这里是因为你像我一样被困住了,请执行以下操作:
使用 CUDA 8.0 (https://developer.nvidia.com/cuda-toolkit-archive)
对我来说只有 运行文件安装有效!
我安装了 Python 3.6,但是在创建您的环境时,您应该改用 python="3.5"
所以我花了一天时间尝试安装 TF GPU,但没有成功。
我已经安装了 CUDA Toolkit 9.0 并尝试了 CuDNN v7.0.3(适用于 CUDA 8 和 9)以及 v6.0。
尝试执行我的演示程序后,终端抛出此消息:
Traceback (most recent call last):
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "twicetwo.py", line 5, in <module>
import tensorflow
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/home/gemboly/anaconda3/envs/tensorflow/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.8.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.
我更新了 LD_LIBRARY_PATH
变量以及 PATH
。
我正在使用 Anaconda,使用 Python 3.6 创建了一个源代码,因为 python --version
放弃了这个版本。
有人可以帮我解决这个问题吗?
我已经 运行 成功了。如果你在这里是因为你像我一样被困住了,请执行以下操作:
使用 CUDA 8.0 (https://developer.nvidia.com/cuda-toolkit-archive) 对我来说只有 运行文件安装有效!
我安装了 Python 3.6,但是在创建您的环境时,您应该改用 python="3.5"