【发布时间】:2022-07-21 16:18:56
【问题描述】:
我有一个 Azure Artifacts 提要,其中包含一个名为 py-data(这是别名)的 Python 包。这可以从提要安装在我的本地计算机上,但是,我正在尝试将其安装为构建管道的依赖项。
我的 YAML 代码如下所示:
pool:
vmImage: windows-latest
strategy:
matrix:
Python39:
python.version: '3.9'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- task: PipAuthenticate@1
displayName: 'Pip Authenticate'
inputs:
artifactFeeds: 'foo-packages'
onlyAddExtraIndex: true
- script: |
python -m pip install --upgrade pip
pip install py-data
pip install -r requirements.txt
displayName: 'Install dependencies'
- script: |
pip install pytest pytest-azurepipelines
pytest
displayName: 'pytest'
这不起作用,我收到以下错误:
ERROR: Could not find a version that satisfies the requirement py-data (from versions: none)
PipAuthenticate 提供的 URL 的样式为 https://build:***@bdouk.pkgs.visualstudio.com/,这与人工制品选项卡中连接到提要提供的样式不同。
【问题讨论】:
标签: python azure-devops