【发布时间】:2020-06-10 02:31:30
【问题描述】:
我有一个 pip 要求文件,其中包含特定的纯 cpu 版本的 torch 和 torchvision。我可以使用以下 pip 命令成功安装我的要求。
pip install --requirement azure-pipelines-requirements.txt --find-links https://download.pytorch.org/whl/torch_stable.html
我的需求文件是这样的
coverage
dataclasses
joblib
matplotlib
mypy
numpy
pandas
param
pylint
pyro-ppl==1.2.1
pyyaml
scikit-learn
scipy
seaborn
torch==1.4.0+cpu
torchvision==0.5.0+cpu
visdom
这适用于 bash,但如何从 conda 环境 yaml 文件中使用 find-links 选项调用 pip?我目前的尝试是这样的
name: build
dependencies:
- python=3.6
- pip
- pip:
- --requirement azure-pipelines-requirements.txt --find-links https://download.pytorch.org/whl/torch_stable.html
但是当我调用时
conda env create --file azure-pipeline-environment.yml
我收到此错误。
Pip 子进程错误:
错误:找不到满足要求的版本 torch==1.4.0+cpu(来自 -r E:\Users\tim\Source\Talia\azure-pipelines-requirements.txt(第 25 行))(来自版本: 0.1.2, 0.1.2.post1, 0.1.2.post2)
错误:未找到 torch==1.4.0+cpu 的匹配分布(来自 -r E:\Users\tim\Source\Talia\azure-pipelines-requirements.txt(第 25 行))CondaEnvException: Pip 失败
从 conda 环境 yaml 文件调用 pip 时如何指定 find-links 选项?
【问题讨论】: