4

I want to install statemodel so i am running

sudo pip install --upgrade -r /srv/requirements.txt

contain of requirements.txt

cat requirements.txt
numpy==1.9.0
scipy==0.14.0
patsy==0.3.0
pandas==0.13.0
statsmodels==0.5.0

but it looks like pip is not installing packages listed in requirements.txt in order because I am getting dependency error like "statsmodels required scipy"

Is there any way to make pip to install packages in the order they have listed in requirements.txt ?

roy
  • 6,344
  • 24
  • 92
  • 174
  • Please search the scipy and statsmodels issue list before you report this as a bug. This is fixed in master and a release will be forthcoming very shortly. – jseabold Sep 25 '14 at 22:04

2 Answers2

3

You could install using the pip module

import pip
with open("requirements.txt") as f:
    for line in f:
        # call pip's main function with each requirement
        pip.main(['install','-U', line])
Community
  • 1
  • 1
Padraic Cunningham
  • 176,452
  • 29
  • 245
  • 321
0
cat /srv/requeriments.txt | xargs pip install --upgrade -r
drez90
  • 814
  • 5
  • 17