Skip to content

Instantly share code, notes, and snippets.

@kahlos
Created October 28, 2015 19:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kahlos/c345448fab427db52ef6 to your computer and use it in GitHub Desktop.
Save kahlos/c345448fab427db52ef6 to your computer and use it in GitHub Desktop.
Inkscape Missing libxml2 OSX Fix
I have installed Inkscape via homebrew, so this may not work with the website binaries.
TL;DR fix:
Make sure you are using the system version of python, check with
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
Hooray!
@AMStrix
Copy link

AMStrix commented Jan 18, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment