【发布时间】:2019-09-19 08:37:35
【问题描述】:
我想在 Arch linux 中将我的 cuda 10.1 降级为 cuda 10.0,因为 tensorflow 只需要 cuda 10.0。
我在 Arch Linux 的 CUDA 10.1 上安装了 tensorflow,但我不知道 tensorflow-gpu 需要 CUDA 10.0 或更低版本。
我尝试将所需的 10.0 库与新的 10.1 库进行符号链接,但没有成功。
每当我尝试在 python 控制台中导入 tensorflow 时,都会显示找不到“libcublas.so.10.0”。
所以我发现我只能在 CUDA 10.0 上运行 tensorflow,所以现在我想降级我的 CUDA。但我不知道如何在 Arch Linux 中做到这一点。
每次我运行import tensorflow 时都会出现此错误。
Traceback (most recent call last):
File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/techievin/.local/lib/python3.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)
File "/usr/lib/python3.7/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.7/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/lib/libcublas.so.10.0: version `libcublas.so.10.0' not found (required by /home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/techievin/.local/lib/python3.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)
File "/usr/lib/python3.7/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.7/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/lib/libcublas.so.10.0: version `libcublas.so.10.0' not found (required by /home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
Failed to load the native TensorFlow runtime.
pacman -S cuda=="10.0" 不工作。
我到处搜索,但找不到任何合适的解决方案让 Arch Linux 降级到 CUDA 10.0
【问题讨论】:
-
完全不需要这个,ArchLinux 官方 repos 中有 TensorFlow 包,已经用 Arch 的 CUDA 版本编译,见:archlinux.org/packages/…
-
那是同样的错误,你真的把 tensorflow 从 pip 中删除,然后用 pacman 安装了吗?
-
现在它给出了这个错误
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory并且 Cuda 安装在 /opt/cuda 中,如果我尝试nvcc --version它说找不到命令 -
你没有回答我的直接问题,这意味着我无法帮助你。
-
很抱歉,我没有刷新提要并发表了评论。是的,我从 pip 中删除了 tensorflow 并安装了
python-tensorflow-gpu,所以现在它完全可以正常工作了。非常感谢。
标签: tensorflow deep-learning cuda archlinux