pip install dependency links

后端 未结 4 1933
花落未央
花落未央 2020-11-29 08:25

I am using python version 2.7 and pip version is 1.5.6.

I want to install extra libraries from url like a git repo on setup.py is being in

4条回答
  •  离开以前
    2020-11-29 09:22

    You need to make sure you include the dependency in your install_requires too.

    Here's an example setup.py

    #!/usr/bin/env python
    from setuptools import setup
    
    setup(
        name='foo',
        version='0.0.1',
        install_requires=[
            'balog==0.0.7'
        ],
        dependency_links=[
            'https://github.com/balanced/balog/tarball/master#egg=balog-0.0.7'
        ]
    )
    

    Here's the issue with your example setup.py:

    You're missing the egg name in the dependency links you setup.

    You have

    https://github.com/egemsoft/esef-auth/tarball/master/#egg=1.0.0.0

    You need

    https://github.com/egemsoft/esef-auth/tarball/master/#egg=esef-auth-1.0.0.0

提交回复
热议问题