Pip无法找到含post release与dev版本段的依赖wheel文件
带post/dev后缀版本号的Wheel依赖安装失败问题
基本情况
- 涉及的两个Wheel文件:
project_a-0.0.1.post25.dev0+26d9a21-py3-none-any.whllibrary_a-0.0.1.post25.dev0+26d9a21-py3-none-any.whl
project-a对library-a的版本约束为>=0.0.1.post25.dev0+26d9a21,<0.0.2,该约束由Poetry从^0.0.1.post25.dev0+26d9a21规则生成。
安装命令
通过自定义Wheel目录执行安装:
python3 -m pip install --no-cache-dir --find-links=/tmp/wheels/ project-a
错误信息
执行安装后弹出以下错误:
ERROR: Could not find a version that satisfies the requirement library-a<0.0.2,>=0.0.1.post25.dev0+26d9a21 (from project-a) (from versions: 0.0.1.post25.dev0+26d9a21) ERROR: No matching distribution found for library-a<0.0.2,>=0.0.1.post25.dev0+26d9a21
补充说明
- 使用
0.0.1这类常规版本号时,安装流程可正常完成。 - 当前所用的post/dev版本号符合PEP-0440规范,Wheel文件名也满足PEP-0427规范要求。
- Poetry生成的
project-a的METADATA文件中,依赖声明内容为:Requires-Dist: library-a (>=0.0.1.post25.dev0+26d9a21,<0.0.2)
内容的提问来源于stack exchange,提问作者gerben
相关产品推荐
相关产品推荐

