I have a privately hosted package that has a name conflict with a public package found on PyPi. Unfortunately, because the public version is higher than my private package, a simple pip install <package_x>
command finds the public version instead of my privately hosted package.
In effect:
PyPi (public) hosts package_x==1.5.0
PrivateRepo (private) hosts package_x==1.3.0
I would like pip install package_x
to install the private version 1.3.0 without requiring me to specify the version or the index within the pip install command (purely through a configuration file.)
I'm trying to set up my pip config to look only at a specific private repo for a single package, but both the private repo and the standard https://pypi.python.org/simple/
repo for everything else. I tried setting the private repo as my index-url and PyPi as an extra-index-url, but that will still search both repositories for the most recent package version.
Is there anyway to specify, within my pip config, the specific repo to use for a given package? Ideally something like this:
[global]
force-index: https://privaterepo.net/simple
- package_x