Version of Inkscape: 0.47
Platform: MacOS 10.6.2
When I try to run Extensions -> Generate from path -> Pattern from path I get an error message:
"The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension. ..."
But I do have the lxml Python module installed:
> python
Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
>>> help(lxml)
Help on package lxml:
NAME
lxml - # this is a package
FILE
/Library/Python/2.6/site-packages/lxml/__init__.py
What am I missing?
Inkscape can't find the lxml Python module (MacOS)
-
- Posts: 2
- Joined: Sat Dec 27, 2008 9:20 pm
Re: Inkscape can't find the lxml Python module (MacOS)
Do you use the bundled Inkscape 0.47 from sf.net? This package has both required Python modules 'lxml' and 'numpy' included and loads them first if $PYTHONPATH in the launcher script is unchanged. Unfortunately there's an up-to-now unresolved issue with those bundled modules and the default python binary installed on OS X Snow Leopard:
Bug #482993 in Inkscape: “Inkscape extensions do not work on MacOS X 10.6 (Snow Leopard)”
what you could try:
Note to other Inkscape users on OS X Snow Leopard who happen to read this because it turned up in a google or forum search: this is not a general tip or recommendation but applies only if you have all needed modules already installed outside of the Inkscape application bundle! You should not modify any files inside the application bundle because it can break stuff and prevent Inkscape from launching at all.
Bug #482993 in Inkscape: “Inkscape extensions do not work on MacOS X 10.6 (Snow Leopard)”
what you could try:
- rename the folder 'python' inside the Inkscape application bundle (Inkscape.app/Contents/Resources/python) so that other modules are searched and used
- if above solution doesn't help you might need to edit $PYTHONPATH in the launcher script (Inkscape.app/Contents/Resources/bin/inkscape) if you know how to configure python to find the correct modules.
Note to other Inkscape users on OS X Snow Leopard who happen to read this because it turned up in a google or forum search: this is not a general tip or recommendation but applies only if you have all needed modules already installed outside of the Inkscape application bundle! You should not modify any files inside the application bundle because it can break stuff and prevent Inkscape from launching at all.
-
- Posts: 2
- Joined: Tue Feb 02, 2010 2:29 am
unresolved



I return to the topic because I have no solution
This is error:
Inkscape version:
and OS:
please if anyone knows of any solution.

Re: Inkscape can't find the lxml Python module (MacOS)
ivan.alvarado wrote:please if anyone knows of any solution
To my knowledge this is not yet solved… There have been some workarounds reported, but not yet a definitive solution:
Bug #482993 in Inkscape: “Inkscape extensions do not work on MacOS X 10.6 (Snow Leopard)”
InkscapeForum.com • Topic • Inkscape and OS X 10.6 Snow Leopard
Re: Inkscape can't find the lxml Python module (MacOS)
I just had the same problem.
Issuing "easy-install lxml" and "easy-install numpy" in a terminal placed the modules in a place where python does now find them.
The $PYTHONPATH-thing is set to a proper value in the startup script ".../bin/inkscape", it seems however that it gets ignored or is not properly passed to the processing instance of the interpreter.
I can imagine that two symlinks would do the same trick, but it would be a rather dirty "solution".
Issuing "easy-install lxml" and "easy-install numpy" in a terminal placed the modules in a place where python does now find them.
The $PYTHONPATH-thing is set to a proper value in the startup script ".../bin/inkscape", it seems however that it gets ignored or is not properly passed to the processing instance of the interpreter.
I can imagine that two symlinks would do the same trick, but it would be a rather dirty "solution".