1

在无法锁定后,我尝试按照本教程pipenv install torch进行操作,我使用的是 Linux Mint 20.3 una

pipenv install --extra-index-url https://download.pytorch.org/whl/cu113/ "torch==1.10.1+cu113"

经过长时间的“安装手电筒...”阶段后导致此问题:

Error:  An error occurred while installing torch==1.10.1+cu113!
Error text: Looking in indexes: https://download.pytorch.org/whl/cu113/, https://pypi.org/simple
Collecting torch==1.10.1+cu113
  Downloading https://download.pytorch.org/whl/cu113/torch-1.10.1%2Bcu113-cp39-cp39-linux_x86_64.whl (1821.5 MB)


✘ Installation Failed 

图片 这也没有奏效。

Installing torch==1.10.2+cu113...
Error:  An error occurred while installing torch==1.10.2+cu113!
Error text: 
ERROR: Could not find a version that satisfies the requirement torch==1.10.2+cu113 (from versions: 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2)
ERROR: No matching distribution found for torch==1.10.2+cu113

编辑:

我尝试过失败:

    pipenv install --extra-index-url https://download.pytorch.org/whl/ "torch==1.10.1+cu102"
    Installing torch==1.10.1+cu102...
    Adding torch to Pipfile's [packages]...
    ✔ Installation Succeeded 
    Pipfile.lock (6516c9) out of date, updating to (2de599)...
    Locking [dev-packages] dependencies...
    Locking [packages] dependencies...
    Building requirements...
    Resolving dependencies...
    ✘ Locking Failed! 
4

1 回答 1

0

我解决了,我没有那些 GPU,所以我必须使用[教程的第三个命令行][1]

    pipenv install --extra-index-url https://download.pytorch.org/whl/ "torch==1.10.1+cpu"
    Installing torch==1.10.1+cpu...
    Adding torch to Pipfile's [packages]...
    ✔ Installation Succeeded 
    Pipfile.lock (6516c9) out of date, updating to (3c44bd)...
    Locking [dev-packages] dependencies...
    Locking [packages] dependencies...
    Building requirements...
    Resolving dependencies...
    ✔ Success! 
    Updated Pipfile.lock (3c44bd)!
    Installing dependencies from Pipfile.lock (3c44bd)...
         ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:


  [1]: https://github.com/pypa/pipenv/issues/4961#issuecomment-1045679643
于 2022-03-02T10:43:29.717 回答