【问题标题】:Packages from private pypi don't find requirements来自私人 pypi 的包找不到要求
【发布时间】:2016-12-26 20:25:42
【问题描述】:

我正在构建一个私有 pypi 服务器并且它正在工作,但是我放在那里的包有一些官方 pypi 的要求,但是当我尝试安装我的私有包时,install_requires 会在试图找到外部依赖项时中断在我的私人存储库中(我在日志中看到了这个)。

当我在本地生成包并尝试安装时

pip install -U package.tar.gz

它可以工作,并且依赖项可以在官方 pypi 存储库中找到。

我错过了什么?

我的流程如下:

python setup.py sdist upload -r http://127.0.0.1:8000/sample/
pip install -i http://127.0.0.1:8000/pypi/

我得到:

Downloading/unpacking mypackage
  http://127.0.0.1:8000/pypi/mypackage/ uses an insecure transport scheme (http). Consider using https if 127.0.0.1:8000 has it available
  Downloading mypackage-1.0.tar.gz (399kB): 399kB downloaded
  Running setup.py (path:/tmp/pip-build-LjFfGj/mypackage/setup.py) egg_info for package mypackage

Downloading/unpacking feedparser (from mypackage)
  http://127.0.0.1:8000/pypi/feedparser/ uses an insecure transport scheme (http). Consider using https if 127.0.0.1:8000 has it available
  Could not find any downloads that satisfy the requirement feedparser (from mypackage)
Cleaning up...
No distributions at all found for feedparser (from mypackage)
Storing debug log for failure in /home/rodolpho/.pip/pip.log

在日志中我看到:

Downloading/unpacking feedparser (from mypackage)
  Getting page http://127.0.0.1:8000/pypi/feedparser/
  Could not fetch URL http://127.0.0.1:8000/pypi/feedparser/: 404 Client Error: Not Found

【问题讨论】:

  • 尝试将--extra-index-url https://pypi.python.org/pypi 添加到您的pip install 命令中。见here。
  • 它可以工作@AlbertoGarcia-Raboso,谢谢。
  • 太棒了!我将添加我的评论作为答案。

标签: python python-2.7 pip setuptools


【解决方案1】:

将--extra-index-url https://pypi.python.org/pypi 添加到您的pip install 命令中。请参阅文档here。

【讨论】:

    猜你喜欢
    • 2020-09-28
    • 2014-01-25
    • 1970-01-01
    • 1970-01-01
    • 2021-09-30
    • 2019-11-26
    • 2017-11-16
    • 2020-04-21
    • 2013-07-08
    相关资源
    最近更新 更多