PyTorch安装问题-使用Jupyter笔记本电脑和Conda导航器找不到软件包

时间:2020-10-02 11:04:47

标签: python installation jupyter-notebook pytorch conda

我尝试使用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.

做什么?

1 个答案:

答案 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

如果您查看win64https://conda.anaconda.org/pytorch/win-64,它实际上包含pytorch个软件包。

因此,pytorch频道中没有x86 pytorch软件包,此外,无法创建其他架构的环境,这意味着您需要安装64位Anaconda使用pytorch