为什么conda安装旧的pytorch默认使用cudatoolkit=11.2



我正在尝试安装condacudatoolkit=11.2在谷歌colab使用:

conda install pytorch cudatoolkit=11.2 -c pytorch -c nvidia

但是为什么安装旧的pytorch=1.0.0版本而不是>1.6版本?

如果我尝试强制安装pytorch=1.6,它给出以下错误:

UnsatisfiableError: The following specifications were found to be incompatible with a past
explicit spec that is not an explicit spec in this operation (cudatoolkit):
- cudatoolkit=11.2
- pytorch=1.6 -> cudatoolkit[version='>=10.1,<10.2|>=10.2,<10.3|>=9.2,<9.3']
The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package setuptools conflicts for:
setuptools
python=3.7 -> pip -> setuptools
conda[version='>=4.10.3'] -> setuptools[version='>=31.0.1']
wheel -> setuptools
pip -> setuptools
...

根据答案编辑:

当我尝试使用conda install -c conda-forge pytorch cudatoolkit=11.2时,它给出以下错误:

PackagesNotFoundError: The following packages are not available from current channels:
- cudatoolkit=11.2
- __glibc[version='>=2.17,<3.0.a0']
Current channels:
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/linux-64
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/pro/linux-64
- https://repo.anaconda.com/pkgs/pro/noarch

pytorchchannel还没有任何与cudatoolkit=11.2兼容的pytorch版本。求解器找到的是旧版本的PyTorch,其中它们没有正确的依赖版本上限。

如果你坚持cudatoolkit=11.2,那么你需要坚持Conda锻造堆栈:

conda install -c conda-forge pytorch cudatoolkit=11.2

否则,如果你想要正式的PyTorch构建,那么他们构建到v11.1兼容的版本:

conda install -c pytorch -c conda-forge pytorch cudatoolkit=11.1

最新更新