4

I'm confused. I've got a working pip install command (meaning: it installs a version of a library from Github which works for me), and I have a non-working (meaning: it installs a version of a library which does not work for me) way of putting that requirement into a requirements.txt file.

More concrete:

If I type on the command line

pip install -e 'git://github.com/mozilla/elasticutils.git#egg=elasticutils'

and then test my program, all works fine. If I put this line into my requirements.txt:

-e git://github.com/mozilla/elasticutils.git#egg=elasticutils

and then run my program, it breaks with an error (only the library should have changed, so I guess sth has changed in that library between the two versions).

But shouldn't both versions do exactly the same?? (Of course I've done my best to remove the installed version of the library between the two tests again, using pip uninstall elasticutils.)

Any information welcome …

Alfe
  • 56,346
  • 20
  • 107
  • 159
  • Ah, I just found out that by putting it into the `requirements.txt` it was evaluated together with the other lines in that file; one was stating `requests==0.14.2` which seems to override sth that `elasticutils` package needs. I'm going to have a look if this is a way to fix this. – Alfe May 17 '13 at 14:58

2 Answers2

1

Yep, as I wrote in my comment above, there seems to be a dependency-override when the requirements.txt states different than the dependencies in the packages. In my case installing the package manually also installed the (newer) version of requests, namely 1.2.0. Using the requirements.txt always installed (due to the override) the version 0.14.2 of requests.

Problem solved by updating the requests version in the requirements.txt :-)

Alfe
  • 56,346
  • 20
  • 107
  • 159
0

Well I don't know exactly what's the difference, but when I want something to be installed from the requirements.txt and it's a git repo I do the following line:

#git+https://github.com/user/package_name.git

and then installing as following:

pip install -r requirements.txt
PepperoniPizza
  • 8,842
  • 9
  • 58
  • 100
  • Thank you for the answer but I think it has sth to do with the other lines in the `requirements.txt` which seem to override dependencies in my wanted package. – Alfe May 17 '13 at 14:59