简体   繁体   English

使用 conda 或 pip 在 Windows 上安装 conda

[英]install conda on windows with conda or pip

I am trying to install pytorch on my window.我正在尝试在我的窗口上安装 pytorch。

First, I get command conda install pytorch torchvision cpuonly -c pytorch from 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.**

Then I also switch pip install by the command pip3 install torch==1.3.1+cpu torchvision==0.4.2+cpu -f https://download.pytorch.org/whl/torch_stable.html Then I met this error:然后我也通过命令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**

I really don't know how to fix it, please help me and thank you very much!我真的不知道如何解决它,请帮助我,非常感谢!

To install pytorch follow these two steps.要安装 pytorch,请按照以下两个步骤操作。

First of all run this command首先运行这个命令

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

then run this code然后运行此代码

C:\Users\User>pip3 install torchvision

It looks as though you may have the 32-bit installation of Python, in which case you're issue is this: #16633 .看起来您可能安装了 32 位 Python,在这种情况下,您的问题是: #16633

Just be aware, that pyTorch doesn't work on 32-bit systems .请注意, pyTorch 不适用于 32 位系统

Please use Windows and Python 64-bit version.请使用 Windows 和 Python 64 位版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM