4

I've run the latest few versions of Inkscape (currently landed on "0.47+devel"), and have been having trouble with the Extensions menu. So far, in every version of Inkscape I've tried, nearly every extension yields the following error:

The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension. Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, or install it through your package manager by a command like: sudo apt-get install python-lxml

I've tried the instructions listed there, of course, with no effect. I've also found many references to this issue on fora, in bug trackers, etc., and as such also tried:

sudo easy_install lxml
cd /Applications/Inkscape.app/Contents/Resources/lib
mv libxml2.2.dylib libxml2.2.dylib.old
ln -s /usr/lib/libxml2.dylib

and a few similar solutions. Nothing has produced any change in Inkscape's behavior.

Does anyone know A) what's really going on here? Because from what I gather the error is not describing the actual problem. And of course B) a simple solution? I need those features! :)

4 Answers 4

3

I had this problem and managed to get rid of it by installing lxml externally (I presume that's what your easy_install lxml command is doing, although I used sudo port install py26-lxml instead).

Then I went into

/Applications/Inkscape.app/Contents/Resources/python/site-packages/i386

Under here, there are several directories, one for each Python version, and each contains a copy of lxml. I renamed these, restarted inkscape and the extensions started working.

Thus

sudo port install py26-lxml
cd /Applications/Inkscape.app/Contents/Resources/python/site-packages/i386
mv 2.3/lxml 2.3/_lxml
mv 2.4/lxml 2.4/_lxml
mv 2.5/lxml 2.5/_lxml
mv 2.6/lxml 2.6/_lxml

Worked for me.

1
  • Thank you! Nobody yet had suggested renaming the lxml folders.
    – andyvn22
    Jun 8, 2010 at 17:32
5

For me (Inkscape 0.48 on Lion), nothing seemed to help, but this did:
https://answers.launchpad.net/inkscape/+question/194132#comment-6
Its quite easy, just inserting a line in the Inkscape start script.
I read somewhere that the problem is gonna be fixed with Inkscape 0.48.3.

1
  • Works for me as well, and it's definitely much simpler than the accepted answer.
    – herzbube
    Jan 19, 2013 at 21:55
2

I have installed Inkscape via homebrew, so this may not work with the website binaries, look here for a possible solution.

TL;DR fix: Make sure you are using the system version of python, check by running

which python
❯ /usr/bin/python

Install python package manager pip, if it isn’t already

sudo easy_install pip
❯

Use pip to install libxml into your system python

sudo pip install lxml
❯ Collecting lxml…

Fin.

Basically the problem is that Inkscape is hardcoded to use the system python build, to avoid conflicts with other python builds. But I presume in a recent update of OSX they have removed the libxml library from the system build.

Firstly I had to delete my homebrew install of python, it’s the same version (2.7.10) as the system build so no loss. Secondly, I needed to install pip to the system python using

❯ sudo easy_install pip

Finally, I installed libxml to the system python install with

❯ sudo pip install lxml
0

The easiest way I could find is this:

  1. Install homebrew http://mxcl.github.io/homebrew/, run brew doctor, fix as necessary, brew update and brew upgrade
  2. Install inkscape via homebrew: brew install inkscape

It handles everything. You can then either load Inkscape via the command line or make a link to your applications folder. Working on Mountain Lion, but not tested on a naked install. Note that I also have python and associated packages installed via homebrew/pip which may have helped.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .