3

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
  • 40,100
  • 10
  • 77
  • 96

1 Answers1

6

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

Check out more information at https://pip.pypa.io/en/stable/cli/pip_wheel/#cmdoption-extra-index-url

Cris Luengo
  • 49,445
  • 7
  • 57
  • 113
Hugo Tavares
  • 25,794
  • 5
  • 46
  • 44