小编Sid*_*osh的帖子

从 requirements.txt 安装 PyTorch

Torch 文档说使用

pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
Run Code Online (Sandbox Code Playgroud)

安装最新版本的 PyTorch。这在我手动执行时有效,但是当我将其添加到 req.txt 并执行时pip install -r req.txt,它失败并显示 ERROR: No matching distribution.

编辑:从 req.txt 添加整行并在此处添加错误。

torch==1.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.htmltorch==1.4.0+cpu
Run Code Online (Sandbox Code Playgroud)
ERROR: Could not find a version that satisfies the requirement torch==1.4.0+cpu (from -r requirements.txt (line 1)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 0.3.1, 0.4.0, 0.4.1, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.4.0)
ERROR: No matching distribution found for torch==1.4.0+cpu (from -r requirements.txt (line 1))
Run Code Online (Sandbox Code Playgroud)

python pip requirements.txt pytorch

16
推荐指数
4
解决办法
7117
查看次数

标签 统计

pip ×1

python ×1

pytorch ×1

requirements.txt ×1