Fix Python – How to write to include a Git repository as a dependency


Asked By – Ankur Agarwal

I am trying to write for my package. My package needs to specify a dependency on another Git repository.

This is what I have so far:

from setuptools import setup, find_packages

    description='This is a description for abc',
    dependency_links = [

When I run:

pip install -e

I get

Could not find a version that satisfies the requirement
SomePrivateLib>=0.1.0 (from analyse) (from versions: ) No matching
distribution found for SomePrivateLib>=0.1.0 (from analyse)

What am I doing wrong?

Now we will see solution for issue: How to write to include a Git repository as a dependency


Note: this answer is now outdated. Have a look at this answer from @Dick Fox for up-to-date instructions:

You can find the right way to do it here.


The key is not to give a link to a Git repository, but a link to a tarball. GitHub creates a tarball of the master branch for you if you append /tarball/master as shown above.

This question is answered By – cel

This answer is collected from stackoverflow and reviewed by FixPython community admins, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0