1

I've found a few answers that relate to dependency_links but they unfortunately have yet to work for me. I'm writing a python module. It's stored in a private pypi repo, and relies on a few dependencies stored both in the same private repo and the public pypi repository:

setup(
# some other setup
name = 'mymodule',
install_requires = [
    'kazoo',
    'privateDependencyA',
    'privateDependencyB'
],
dependency_links = [
    "http://my.private.repo/eggs/#privateDependencyA",
    "http://my.private.repo/eggs/#privateDependencyB"
])

I store mymodule in my private repository, thus I try to install it:

pip install -i http://my.private.repo/eggs/ mymodule

That works just fine, but fails to find kazoo, which is a public library. Thus I try the -f flag:

$ pip install -i http://my.private.repo/eggs/ -f http://pypi.python.org/ mymodule                                                                                                                                                                                                                                      
Downloading/unpacking mymodule
  Downloading mymoudle-<version>.tar.gz (unknown size): 3.1kB downloaded
  Running setup.py egg_info for package mymodule

Downloading/unpacking kazoo (from mymodule)
  Could not find any downloads that satisfy the requirement kazoo (from mymodule)

Downloading/unpacking kazoo (from mymodule)
  Could not find any downloads that satisfy the requirement kazoo (from mymodule)

How can I download dependencies from the public pypi repository while simultaneously installing my module from my private one?

Community
  • 1
  • 1
Christopher
  • 36,834
  • 9
  • 72
  • 91

1 Answers1

2

Add --extra-index-url http://pypi.python.org/simple to your command. It will first look at http://my.private.repo/eggs/ and then at http://pypi.python.org/simple.

Check out more information at http://www.pip-installer.org/en/latest/usage.html#alternate-package-repositories

Hugo Tavares
  • 23,060
  • 5
  • 45
  • 43