我想在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
答案 0 :(得分:2)
我已经使用 yay
解决了这个问题。使用 yay
,您可以安装旧版本的 cuda
和 cudnn
。根据我的经验,这比从 archive.org 下载要快。
在 Arch 上安装 yay
:
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
搜索您需要的版本:
yay -Ss cuda
yay -Ss cudnn
在撰写此答案时,我需要从 cuda
11.2 降级到 11.0。所以我安装了特定版本:
pacman -R cuda cudnn
yay -S cuda-11.0 cudnn8-cuda11.0
对我来说,Tensorflow 在降级后运行得很顺利。
答案 1 :(得分:1)
我面临着同样的问题,必须重新应用我使用旧gtx670时使用的方法:
请记住,特定的Cuda版本需要特定的nvidia驱动程序。
只需看看compatibility matrix并最终防止驱动程序升级。
答案 2 :(得分:1)
sudo pacman -U cuda-10.0.130-2-x86_64.pkg.tar.xz