我们有一个本地pypi,我们在其中放置了一些python包。但是,pip无法安装该软件包。
pip搜索将找到该包:
$ pip search --index=http://artifactory.ours.com/api/pypi/pypi-local/simple hello
hello - UNKNOWN
但是pip安装提供了以下内容:
pip install --pre -r requirements.txt --trusted-host=artifactory.ours.com
收集hello (从-r requirements.txt (第4行))找不到满足要求hello的版本(从-r requirements.txt (第4行))(从版本:)没有找到与hello匹配的发行版(从-r requirements.txt (第4行))
下面是requirements.txt:
# requirements.txt
--allow-all-external
--extra-index-url http://artifactory.ours.com/artifactory/api/pypi/pypi-local/simple
hello
发布于 2020-07-02 05:33:47
造成此问题的另一个可能原因是,当您在将连字符(-)以包的名称上传到工件时使用它。pip可以成功地搜索和找到您的包,但它无法安装它。用下划线替换连字符。
https://stackoverflow.com/questions/32491185
复制相似问题