Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install packages hosted in a private PyPI using setup.py?

People also ask

Can PyPI be private?

GitHub. (Yes, you can now host your Python package in GitHub by using private-pypi . ) File system.

How do I install Python packages from setup py?

Installing Python Packages with Setup.py To install a package that includes a setup.py file, open a command or terminal window and: cd into the root directory where setup.py is located. Enter: python setup.py install.


it looks like you didnt specify your host like the doc of simplepy said you need to setup your ~/.pypirc with the good hostname like

To use it run "simplepypi". You can upload packages by:

Modify your ~/.pypirc so it looks like:

    [distutils]
    index-servers =
        pypi
        local

    [local]
    username: <whatever>
    password: <doesn't matter, see above>
    repository: http://127.0.0.1:8000

    [pypi]
    ...

then you'll upload your package on it

python setup.py sdist upload -r local

and could install it from there

pip install -i http://127.0.0.1:8000/pypi <your favorite package>

Hope this will help.