I have tried the following two approaches without success.
The first with Cascading Requirements Files.
# requirements.txt
-r requirements/req2.txt
-
The solution in either case is to add --extra-index-url <url>
at the beginning of the requirements.txt
file.
Example:
# requirements.txt
--extra-index-url https://testpypi.python.org/pypi
Django==1.7.7
django-stackexchange-feed==0.4
Or to use Cascading Requirements Files:
# requirements.txt
--extra-index-url https://testpypi.python.org/pypi
-r requirements/req2.txt
-r requirements/req3.txt
# requirements/req2.txt
Django==1.7.7
# requirements/req3.txt
foo-bar==0.4
pip install -r requirements.txt
will now work.