1

I have to install a package via pip (in detail: the package lxml) into Python2.7 on our server (running on ScientificLinux). There is running Python 2.6 and 2.7.

The command pip points to our Python2.6 installation where the package already exists. When I try to run pip-2.7, he is throwing the following errors:

 Traceback (most recent call last):
  File "/usr/local/bin/pip-2.7", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2659, in <module>
    parse_requirements(__requires__), Environment()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==1.4.1

Thats a well known problem here (Link), but the accepted answer doesn't work. When I want to upgrade pip via easy_install, I get a similar error like the one above:

Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2659, in <module>
    parse_requirements(__requires__), Environment()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: distribute==0.6.49

I found already a possible solution here, but it also doesn't help, the versions are set right :/

Community
  • 1
  • 1
MUmla
  • 445
  • 1
  • 8
  • 26
  • 2
    `pip-2.7` is referring to the Python 2.6 `site-packages` directory. That shouldn't be happening. – Blender Nov 29 '13 at 09:47
  • That's right, that have I noticed, too. (But forget to mention -.-). And how can I fix that? – MUmla Nov 29 '13 at 10:00
  • Can you post the output of `python -m site` ? – Giupo Dec 02 '13 at 17:18
  • Of course. Output is too long for comments, see it [here](http://pastebin.com/DTvf1CYd) on pastebin. I made it with python and python2.7... – MUmla Dec 02 '13 at 18:47

1 Answers1

0

Have you tried using one of the installers on Christopher Gohlke's site? This is a tremendous resource for Windows users (I myself have found them extremely helpful.) He has a number of lxml installers.

duhaime
  • 25,611
  • 17
  • 169
  • 224