首页 > 解决方案 > 具有上游 pypi 的 AWS Codeartifact 未获取最新版本

问题描述

我有一个 python Codeartifact 存储库,它有一个上游 PyPI 存储库。在 PyPI 中,一个新版本的库(google-auth 2.3.1)于 10 月 25 日发布,但每当我尝试通过 Codeartifact 安装它时,最新的可用版本是 2.3.0。

有没有办法告诉 Codeartifact 上游有更新的版本?Codeartifact 在 PyPI 中获取更新需要多长时间?这是我从 AWS 找到的唯一来源,它指出这可能发生,但没有解决方法:https ://docs.aws.amazon.com/codeartifact/latest/ug/external-connection.html#external-connection-不可用

错误信息:

ERROR: No matching distribution found for google-authpip3 install google-auth==2.3.1
Looking in indexes: https://aws:****@packages-****.d.codeartifact.eu-central-1.amazonaws.com/pypi/common/simple/
ERROR: Could not find a version that satisfies the requirement google-auth==2.3.1 (from versions: 0.0.1, 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.10.0, 1.0.0, 1.0.1, 1.0.2, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.4.1, 1.4.2, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.13.0, 1.13.1, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.15.0, 1.16.0, 1.16.1, 1.17.0, 1.17.1, 1.17.2, 1.18.0, 1.19.0, 1.19.1, 1.19.2, 1.20.0, 1.20.1, 1.21.0, 1.21.1, 1.21.2, 1.21.3, 1.22.0, 1.22.1, 1.23.0, 1.24.0, 1.25.0, 1.26.0, 1.26.1, 1.27.0, 1.27.1, 1.28.0, 1.28.1, 1.29.0, 1.30.0, 1.30.1, 1.30.2, 1.31.0, 1.32.0, 1.32.1, 1.33.0, 1.33.1, 1.34.0, 1.35.0, 2.0.0.dev0, 2.0.0b1, 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.2.0, 2.2.1, 2.3.0)

标签: pythonpipaws-codeartifact

解决方案


现在适合我的解决方案:

  1. 如果不可用则创建 venvpython3 -m venv .venv
  2. 激活它source .venv/bin/activate
  3. 安装日志语句中给出的包,例如pip install google-authpip3 --no-cache
  4. 再次运行诗歌poetry install
  5. 如果出现更多错误,请继续 3)

我的假设是,本地 pip/诗歌缓存不是最新的。所以我强制 pip 获取最新版本


推荐阅读