2016-08-19 42 views
0

我正在建立一个私人pypi服务器,它的工作,但我放在那里的包有官方pypi的一些要求,但是当我尝试安装我的私人包,install_requires打破试图找到我的私人存储库中的外部依赖关系(我在日志中看到了这一点)。私人pypi的包没有找到需求

当我在本地生成的包,并尝试安装像

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 
+1

尝试在您的'pip install'命令中添加'--extra-index-url https:// pypi.python.org/pypi'。见[这里](https://pip.pypa.io/en/stable/reference/pip_wheel/#cmdoption--extra-index-url)。 –

+0

它的作品@ AlbertoGarcia-Raboso,谢谢。 –

+0

太棒了!我将添加我的评论作为答案。 –

回答

1

添加--extra-index-url https://pypi.python.org/pypipip install命令。请参阅文档here