gpt4 book ai didi

tensorflow - 如何在 Arch linux 中降级到 cuda 10.0?

转载 作者:行者123 更新时间:2023-12-04 15:06:10 29 4
gpt4 key购买 nike

我想在 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 库进行符号链接(symbolic link),但没有成功。

每当我尝试在 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 的正确答案

最佳答案

我已经通过使用 yay 解决了这个问题.与 yay您可以安装旧版本的 cudacudnn .根据我的经验,这比从 archive.org 下载要快。 .
安装 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 在降级后运行顺利。

关于tensorflow - 如何在 Arch linux 中降级到 cuda 10.0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55925068/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com