【问题标题】:install conda on windows with conda or pip使用 conda 或 pip 在 windows 上安装 conda
【发布时间】:2020-04-06 11:31:02
【问题描述】:

我正在尝试在我的窗口上安装 pytorch。

首先,我从here得到命令conda install pytorch torchvision cpuonly -c pytorch

(PyTorch Build:Stable(1.3);Your OS:Windows;Package:Conda;Language:Python3.6;CUDA:None), there are some problems described as followings:
**(python36) C:\Users\li_dan0109>conda install pytorch torchvision cpuonly -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
  - pytorch
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.**

然后我也通过命令pip3 install torch==1.3.1+cpu torchvision==0.4.2+cpu -f https://download.pytorch.org/whl/torch_stable.html切换pip install 然后遇到这个错误:

**(python36) C:\Users\li_dan0109>pip3 install torch==1.3.1+cpu torchvision==0.4.2+cpu -f https://download.pytorch.org/whl/torch_stable.html
Looking in links: https://download.pytorch.org/whl/torch_stable.html
ERROR: Could not find a version that satisfies the requirement torch==1.3.1+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.3.1+cpu**

我真的不知道怎么解决,请帮帮我,非常感谢!

【问题讨论】:

    标签: python installation pip pytorch conda


    【解决方案1】:

    要安装 pytorch,请按照以下两个步骤操作。

    首先运行这个命令

    C:\Users\User>conda install PyTorch -c PyTorch
    

    然后运行这段代码

    C:\Users\User>pip3 install torchvision
    

    【讨论】:

      【解决方案2】:

      看起来您可能安装了 32 位 Python,在这种情况下,您的问题是:#16633

      请注意,pyTorch doesn't work on 32-bit systems

      请使用 Windows 和 Python 64 位版本。

      【讨论】:

        猜你喜欢
        • 2020-05-29
        • 2018-08-03
        • 1970-01-01
        • 2018-11-19
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-03-14
        相关资源
        最近更新 更多