Python pip无法从本地pypi(jfrog artifactory)中找到包
我们有一个本地pypi,其中放置了一些python包。但是,pip无法安装该软件包 pip搜索将找到包:Python pip无法从本地pypi(jfrog artifactory)中找到包,python,pip,artifactory,pypi,Python,Pip,Artifactory,Pypi,我们有一个本地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.c
$ 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
无法从-r requirements.txt(第4行)收集hello
查找满足需求的版本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
我认为问题在于您的软件包没有版本号。setup.py未指定版本 Python文档中的示例(示例用于distutils):
因此,如果我使用较旧版本的pip,如
1.x
,问题似乎可以解决。不确定这是jfrog错误还是与pip本身有关。此问题的另一个可能原因是在将包上载到artifactory时在包的名称中使用连字符(-)。pip可以成功搜索并找到您的软件包,但无法安装。将连字符替换为下划线。谢谢,但软件包在setup.py
中有0.0.1
版本。