Install lxml on OSX | Comments (2)
Posted in Muffin Research Labs, Snippets on 5th March 2009, 11:10 pm by Stuart
Thanks to this post on lxml from Ian Bicking I’ve found the following command is all that’s required to install lxml on Mac OSX:
STATIC_DEPS=true easy_install 'lxml>=2.2beta4'
STATIC_DEPS=true sudo easy_install 'lxml>=2.2beta4'
The first run without “sudo” pulls down the necessary libxml and libxslt and then the second run provides the permissions to install the egg.

I get (on Mac OS X 10.5.8):
…and so on. (I got the same errors when trying:
(from http://stackoverflow.com/questions/1277124/how-do-you-install-lxml-on-os-x-leopard-without-using-macports-or-fink)
I don’t have a a mac anymore so I can’t test anything out for you. However a quick search turns this up http://osdir.com/ml/python.lxml.devel/2007-12/msg00001.html
The suggests that even though you’re specifying versions of libxml/libxslt it’s building against the stock mac versions anyway for some reason.
e.g: “Using build configuration of libxslt 1.1.12″