86

I'm trying to install lxml. I've had a look at the website, and version 2.2.8 looked reasonable to me but when I did easy_install lxml, it installed version 2.3.beta1 which is not really what I want I presume.

What is the best way to fix this and how can I force easy_install to install a particular version?

(Mac os x 10.6)

Garrett
  • 4,007
  • 2
  • 41
  • 59
dr jerry
  • 9,768
  • 24
  • 79
  • 122
  • lxml depends on a few C libraries for xml, see the accepted answer here http://stackoverflow.com/questions/6504810/how-to-install-lxml-with-easy-install – Emmett Butler Jul 26 '12 at 16:59

3 Answers3

142

I believe the way to specify a version would be like this:

easy_install lxml==2.2.8

I (and most other Python users I suspect) stopped using easy_install and started using pip some time ago, so a solution in those terms is:

easy_install pip
pip install lxml==2.2.8

(pip has several benefits, including an uninstall command)

Ben James
  • 121,135
  • 26
  • 193
  • 155
18

From the easy_install documentation:

easy_install PackageName==1.2.3

7

You should do something like this:

easy_install "lxml==2.2.8"
pyfunc
  • 65,343
  • 15
  • 148
  • 136