如何在 arch linux 中降级到 cuda 10.0?
How to downgrade to cuda 10.0 in arch linux?
我想在 arch linux 中将我的 cuda 10.1 降级到 cuda 10.0,因为 tensorflow 只需要 cuda 10.0。
我在 arch 的 CUDA 10.1 上安装了 tensorflow Linux 但我不知道 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
的任何正确答案
我面临同样的问题,必须 re-apply 我使用旧 gtx670 时使用的方法:
请记住,特定的 Cuda 版本需要特定的 nvidia 驱动程序。
看看 compatibility matrix 并最终阻止驱动程序升级。
- 从这里下载 cuda 10.0 包:http://archlinux.arkena.net/archive/packages/c/cuda/cuda-10.0.130-2-x86_64.pkg.tar.xz
- 安装包
sudo pacman -U cuda-10.0.130-2-x86_64.pkg.tar.xz
我已经使用 yay
. With yay
you can install older versions of cuda
and cudnn
. In my experience this is faster than downloading from 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 运行顺畅。
我想在 arch linux 中将我的 cuda 10.1 降级到 cuda 10.0,因为 tensorflow 只需要 cuda 10.0。
我在 arch 的 CUDA 10.1 上安装了 tensorflow Linux 但我不知道 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
的任何正确答案我面临同样的问题,必须 re-apply 我使用旧 gtx670 时使用的方法:
请记住,特定的 Cuda 版本需要特定的 nvidia 驱动程序。
看看 compatibility matrix 并最终阻止驱动程序升级。
- 从这里下载 cuda 10.0 包:http://archlinux.arkena.net/archive/packages/c/cuda/cuda-10.0.130-2-x86_64.pkg.tar.xz
- 安装包
sudo pacman -U cuda-10.0.130-2-x86_64.pkg.tar.xz
我已经使用 yay
. With yay
you can install older versions of cuda
and cudnn
. In my experience this is faster than downloading from 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 运行顺畅。