I\'ve tried this and run in to problems a bunch of times in the past. Does anyone have a recipe for installing lxml on OS X without MacPorts or Fink that definitely works?<
This worked for me on 10.8.5
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew install libxml2
sudo easy_install lxml
This comprises suggestions from:
But I wanted to compile it into one answer rather than leave comments everywhere
Easy_install can work using this:
STATIC_DEPS=true easy_install 'lxml>=2.2beta4'
you may then need to run, depending on permissions;
STATIC_DEPS=true sudo easy_install 'lxml>=2.2beta4'
see http://muffinresearch.co.uk/archives/2009/03/05/install-lxml-on-osx/
I compile it in /usr/local
without any issues whatsoever.
Install Python, libxml2, libxslt and then lxml. You might need setuptools installed too.