Muffinresearch Labs by Stuart Colville

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.

Post Tools

Comments: Add yours

1. On March 9th, 2010 at 12:28 am Daryl Spitzer said:

I get (on Mac OS X 10.5.8):

NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs to be available.
Using build configuration of libxslt 1.1.12
Building against libxml2/libxslt in the following directory: /usr/lib
src/lxml/lxml.etree.c:176:31: error: libxml/schematron.h: No such file or directory
src/lxml/lxml.etree.c:176:31: error: libxml/schematron.h: No such file or directory
src/lxml/lxml.etree.c:2022: error: syntax error before ‘xmlSchemaSAXPlugStruct’
src/lxml/lxml.etree.c:2024: error: syntax error before ‘}’ token
src/lxml/lxml.etree.c:2022: error: syntax error before ‘xmlSchemaSAXPlugStruct’
src/lxml/lxml.etree.c:2024: error: syntax error before ‘}’ token
src/lxml/lxml.etree.c: In function ‘__pyx_pf_4lxml_5etree_14_ParserContext___dealloc__’:
src/lxml/lxml.etree.c:63671: error: dereferencing pointer to incomplete type
src/lxml/lxml.etree.c: In function ‘__pyx_f_4lxml_5etree_14_ParserContext__copy’:
src/lxml/lxml.etree.c:63763: error: dereferencing pointer to incomplete type

…and so on. (I got the same errors when trying:

python setup.py build --static-deps --libxml2-version=2.7.3  --libxslt-version=1.1.24
sudo python setup.py install

(from http://stackoverflow.com/questions/1277124/how-do-you-install-lxml-on-os-x-leopard-without-using-macports-or-fink)

2. On March 9th, 2010 at 7:03 am Stuart Colville said:

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″







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Using Loggerhead with mod_wsgi|(0)

Here’s a post I wrote over on the Project Fondue Blog about our use of Loggerhead with mod_wsgi under Apache. Loggerhead is the rather nice branch viewer for bazaar branches as used on Launchpad.net.

If you’re not already subscribed to the Project Fondue blog feed then I can recommend it, as there should be some interesting posts coming out of there in the coming months (yes I’m unashamedly biased!).

Ubuntu: Turn off changing workspace with mouse wheel|(1)

I found the changing with the workspace with the mouse wheel really annoying. To disable it go to System => Preferences => CompizConfig (available if the compizconfig-settings-manager package is installed) and uncheck “Viewport Switcher” which is under the “Desktop” heading.

Photos on Flickr

© Copyright 2004-10 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.592s.