2016-08-19 64 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