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?
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