我尝试使用PyTorch官方网站的安装代码安装PyTorch。 我在Conda导航器的Jupyter笔记本中本地运行它
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
我收到以下错误
PackagesNotFoundError: The following packages are not available from current channels:
- pytorch
- cudatoolkit=10.2
Current channels:
- https://conda.anaconda.org/pytorch/win-32
- https://conda.anaconda.org/pytorch/noarch
- https://repo.anaconda.com/pkgs/main/win-32
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-32
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-32
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
做什么?
答案 0 :(得分:1)
TL; DR 使用64位Anaconda
conda
管理一个平台和体系结构的软件包。
您似乎在这里安装了32位(x86)Win Anaconda版本:
- https://conda.anaconda.org/pytorch/win-32
您可以检查该链接(https://conda.anaconda.org/pytorch/win-32)下的频道是否不包含任何pytorch
软件包,并且与此软件包相同:https://conda.anaconda.org/pytorch/noarch
如果您查看win64
:https://conda.anaconda.org/pytorch/win-64,它实际上包含pytorch
个软件包。
因此,pytorch
频道中没有x86
pytorch
软件包,此外,无法创建其他架构的环境,这意味着您需要安装64位Anaconda使用pytorch
。