簡體   English   中英

使用 conda 或 pip 在 Windows 上安裝 conda

[英]install conda on windows with conda or pip

我正在嘗試在我的窗口上安裝 pytorch。

首先,我從這里得到命令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**

我真的不知道如何解決它,請幫助我,非常感謝!

要安裝 pytorch,請按照以下兩個步驟操作。

首先運行這個命令

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

然后運行此代碼

C:\Users\User>pip3 install torchvision

看起來您可能安裝了 32 位 Python,在這種情況下,您的問題是: #16633

請注意, pyTorch 不適用於 32 位系統

請使用 Windows 和 Python 64 位版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM