Python crashes on Mac OS X (lxml related)
If you are on Mac OS X, and you have a package that uses the lxml library, you may fall victim to an incompatibility between recent versions of lxml and the versions of libxml2 and libxslt that come installed with Mac OS X. This causes a segmentation fault when certain lxml commands are run, typically manifesting a Python crash (and a dialog box to that effect) when Plone starts up. This problem should be fixed for new installations, because the lxml team now build binary eggs that should work on OS X. However, if you are unlucky, you may still find yourself with an egg built on your own machine that gives difficult-to-debug crashes. There are two ways to fix this. This is the preferred solution. lxml comes with binary eggs for Windows and OS X that bundle the correct versions of libxml2 and libxslt. You may have missed these eggs if you installed lxml manually, or if you have an old version installed. To make sure you have the latest build, you should remove any cached version of the egg or the downloaded source tarball from your cache and re-run buildout. This approach works by instructing buildout to build its own version of lxml. First, add an lxml part to buildout.cfg as the first part. It's important that this goes first, to avoid buildout downloading and using an lxml source distribution prematurely. Then add the following part: This will make your buildout take a bit longer, as it will download and compile libxml2 and libxslt. However, it should then build lxml against these versions.Use a binary egg
Build your own static version
[buildout]
parts =
lxml
...
[lxml]
recipe = z3c.recipe.staticlxml
egg = lxml
force = false
