【问题标题】:How to downgrade CUDA to 10.0.10 with conda, without conflicts?如何使用 conda 将 CUDA 降级到 10.0.10,而不会发生冲突?
【发布时间】:2021-01-13 05:00:09
【问题描述】:

我想去CUDA(cudatoolkit)版本兼容 Nvidie-430 驱动程序,即10.0.130,由Nvidias site 推荐。

基于this answer我做了,

conda install -c pytorch cudatoolkit=10.0.130

然后我得到this error (pastebin link)。 (以下是非常简短的版本):

(fastaiclean) eghx@eghx-nitro:~$ conda install -c pytorch cudatoolkit=10.0.130
...  
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: | 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed   
UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package _libgcc_mutex conflicts for:
pyzmq -> libgcc-ng[version='>=7.3.0'] -> _libgcc_mutex=[build=main]
libgcc-ng -> _libgcc_mutex=[build=main]
lcms2 -> libgcc-ng[version='>=7.3.0'] -> _libgcc_mutex=[build=main]
...  
The following specifications were found to be incompatible with your system:

  - feature:/linux-64::__cuda==10.1=0
  - feature:|@/linux-64::__cuda==10.1=0

Your installed version is: 10.1

为什么我会遇到冲突? cuda 工具包时为什么说10.110.2.89 (conda list)?如何处理冲突?我能做些什么 有这个错误?冲突太大了,我不知道从哪里开始。

其他

  • 英伟达驱动430

  • 当前 cudatoolkit:10.2.89

【问题讨论】:

  • 我记得通过 pip 安装了不正确的 Cuda 版本(10.1 与 11)的 Pytorch,但它仍然有效。 IIRC pip install torch 也安装了libcudarc.so 和其他东西。如果它有效,那么不要修复它
  • pytorch 和 cuda 可能兼容。但问题是 nvidia 驱动程序(版本 430)不适用于 10.1 及更高版本(Nvidia website)。你能告诉我你认为我应该安装什么的清单吗? “其他事情”是什么意思?我是菜鸟。我还应该卸载 pytorch 和 cudatoolkit 吗?还是?
  • 不,我当时只是pip install torch,它安装了cuda 10.1,它不应该在那台PC上使用。你应该试试import torch; torch.zeros(1).cuda() 看看它是否出错。如果没有,那么它可以工作
  • AssertionError: The NVIDIA driver on your system is too old (found version 10010). 我认为这说明 Nvidia 驱动程序和 cuda 不兼容。但是,我无法增加我的 nvidia 驱动程序版本,因为 ubuntu 16 它只有 430(这是最新的)。
  • 所以我试着去10.0.130

标签: python pytorch conda


【解决方案1】:

最简单的方法是创建一个新环境,因为冲突检查器可能需要很长时间才能运行。

如果这是你的根环境,那么这里列出了重置方法How to reset anaconda root environment

否则,只需删除您的环境并创建一个新环境。

【讨论】:

  • 你明白为什么它说我安装了 10.1 而我通过 conda list 的 cudatoolkit 是 10.2.89 吗? pytorch 看到其他 cuda 了吗?
  • 问题不在于冲突检查器需要时间。这是我需要做的才能理解错误。我什至不知道从哪里开始。
  • 我将创建一个新环境并尝试从一开始就将 pytorch、cuda 和 torchvision 强制设置为我想要的版本? conda install -c fastai -c pytorch -c anaconda fastai gh pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.0.130 -c pytorch
【解决方案2】:

检查当前版本

torch.version.cuda

我有 10.2。但我需要 10.1 根据:表 1 here 并安装了我的 430 NVIDIA 驱动程序。

卸载和安装

conda remove pytorch torchvision cudatoolkit

conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1.168 -c pytorch

对上述命令的所有内容都说“是”。

【讨论】:

    猜你喜欢
    • 2011-12-03
    • 1970-01-01
    • 1970-01-01
    • 2014-02-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-28
    • 1970-01-01
    相关资源
    最近更新 更多