Some extensions don't work with .48.2 and OSX 10.7.3

Asked by Darren Lennard

Hi - some render extensions (such as gear / Foldable Box) etc don't work with my Inscape .48.2 on OSX 10.7.3

The error I get within Inkscape is

"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"

any thoughts or ideas appreciated!

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
su_v (suv-lp) said :
#1

Known issue with Inkscape 0.48.2 on OS X Lion:
Bug #819209 “Extensions do not work with Mac OS X Lion”
<https://bugs.launchpad.net/inkscape/+bug/819209>

Unfortunately, we don't yet have packages of Inkscape 0.48.3.1 for Mac OS X available for downloading.

Revision history for this message
Darren Lennard (darren-lennard) said :
#2

OK - many thanks.

I have seen mention of workarounds, and downloaded Windell Oakey's Eggbot extension 2.2.2.r2 but either it doesn't work for OSX10.7.3 or I have no idea how to correctly execute it (the latter is more likely in my opinion)

Revision history for this message
mahfiaz (mahfiaz) said :
#3

Does any of these guides help you? https://www.google.com/search?q=osx+install+lxml

Revision history for this message
su_v (suv-lp) said :
#4

@mafiaz - ever used a Mac?

@Darren - I did not and still would NOT recommend to you to try to install lxml yourself (there is no installer nor DMG for osx).

Revision history for this message
su_v (suv-lp) said :
#5

@Darren - to get python extensions working with the official Mac OS X package of Inkscape 0.48.2, a single line needs to be inserted into a "text file" (actually a shell script) inside the application bundle.

I can try to guide you to do this edit yourself if you want - one prerequisite though would be that you install a 'real' plain-text editor (Apple's TextEdit won't work because the new 'Autosave' feature on Lion can potentially modify such files in a way that would prevent the application from launching again).

"Free" text editors I could recommend:
- TextWrangler
  <http://barebones.com/products/textwrangler/>
- Sublime 2
  <http://www.sublimetext.com/2>
- Smultron (the old "free" and open-source version, not the one from the App Store):
  <http://sourceforge.net/projects/smultron/files/smultron/3.6b1/>

Another prerequisite would be that you install the original Inkscape app again (because we don't know what exactly happened (or not) when you tried to run the installer package from the Egg-Bot project).

Revision history for this message
Darren Lennard (darren-lennard) said :
#6

@ mahfiaz - I got as far as looking for solutions to the apparent lxml issue but did not try to follow any - none appeared to include, or be specific for, OSX 10.7.3 anywa

@ suv - I would much appreciate an attempt to get them working yes. I also note that you do not recommend an attempt to install lxml myself

Darren

Revision history for this message
su_v (suv-lp) said :
#7

Steps to work around the known issue of python-based extensions not working with the official Inkscape 0.48.2 package on OS X 10.7 Lion:

Prerequisites:
- unmodified version of Inkscape 0.48.2 installed
- alternative text editor is available (see earlier comment)
- quit all open Inkscape windows

1) Open a new Finder window and browse to the directory where you installed Inkscape to (most likely '/Applications').
2) select 'Inkscape', open the context menu (with the right mouse button or 'Ctrl+mouse button' for single-button mouse or 'Ctrl+tap' with the trackpad) and choose the entry 'Show Package Contents'
3) within the package contents, browse to 'Contents > Resources > bin'
4) in 'Contents > Resources > bin' open the file 'inkscape' in a plain-text editor (use drag&drop for example, or 'Open with…' from the context menu)
5) once you have the file (a shell script) open in the text editor, go to line 32.
The content of line 32 is:

export VERSIONER_PYTHON_PREFER_32_BIT=yes

6) above line 32, insert a new line with this text:

export VERSIONER_PYTHON_VERSION=2.6

7) save the changes (make sure that no (hidden) file extension is added)
8) test Inkscape: launch the app and use for example 'Extensions > Render > Gear…' as test

If all went well, all python-based extensions (those from the menu 'Extensions' as well as those used for input/output extensions to support other file formats) will work now as expected.

If something went wrong, trash the modified application, install a fresh copy and report back here.

Revision history for this message
Darren Lennard (darren-lennard) said :
#8

thankyou so much, this worked perfectly.

Many thanks

Darren

Revision history for this message
a orchard (aorchard) said :
#9

Hi suv,

I did modify the file and was able to get passed the lxml message. Now I get this error message:

Traceback (most recent call last):
  File "sozi.py", line 27, in <module>
    import pygtk
ImportError: No module named pygtk

I have installed pygtk through macports, and have also been successful in loading the module in python manually (i.e. executing python and then invoking "import pygtk). But still when I call sozi from inkscape I get the above noted error. I am using the latest table version for inkscape .48.2 and mac os x lion 10.7.3. Any suggestions would be highly appreciated.

Revision history for this message
su_v (suv-lp) said :
#10

a orchard wrote
> But still when I call sozi from inkscape I get the above noted error.

If you already have MacPorts experience, why don't you install inkscape with macports as well? Then you'll have no conflicts between various python versions and python modules.

Getting the precompiled version of Inkscape working with sozi is a hack at best, see
<https://answers.launchpad.net/inkscape/+question/179289>
for an example.

Revision history for this message
su_v (suv-lp) said :
#11

@aorchard - sozi-related issues on OS X Lion would better be asked in a new question, or continued in <https://answers.launchpad.net/inkscape/+question/179289>:
- This one here (Q 194132) covers extensions shipping with Inkscape, and how to get them working for basic usage.
- Extensions like sozi or textext are externally developed custom extensions with a lot of additional dependencies which are not and cannot be fully covered by the official pre-compiled package of Inkscape for Mac OS X (it includes only the minimal requirements - libraries as well as python modules). Questions about sozi and other custom extensions which spawn external dialogs are beyond the scope of this question (Q 194132) IMHO.

Revision history for this message
a orchard (aorchard) said :
#12

@suv, thanks for the response, and I agree. WIll follow up on the other list you noted.

Revision history for this message
daniele (daniele+r+ubilaptop) said :
#13

it works also for me, on mac os mountain lion, thank you ~suv (suv-lp)

Revision history for this message
Darren Lennard (darren-lennard) said :
#14

I'm back I'm afraid, with the same "fantastic xlml wrapper..."error.

Inkscape .48.2 (freshly installed from inkscape.org - although not obviously .48.4 as indicated on download page)
OS 10.8.2
Python 2.7.3 (from python -V)

and line 32 and 33 of Inkscape in Contents/Resources/bin/inkscape read:

export VERSIONER_PYTHON_VERSION=2.6
export VERSIONER_PYTHON_PREFER_32_BIT=yes

any help appreciated, especially a process that might help identify the problem

Revision history for this message
Annabelle Chollet (annabelle-chollet) said :
#15

Hi,
I have tried to go to line 32 in the "inkscape" as you recommended, but I don't have the same text:
Last login: Tue Dec 3 13:10:11 on ttys000
/Volumes/Inkscape/Inkscape.app/Contents/Resources/bin/inkscape ; exit;
iMac-de-Annabelblue:~ annabelblue$ /Volumes/Inkscape/Inkscape.app/Contents/Resources/bin/inkscape ; exit;
Setting Language: .UTF-8

(process:1968): Gtk-WARNING **: Locale not supported by C library.
 Using the fallback 'C' locale.
/Users/annabelblue/.inkscape-etc/gtkrc:56: Clearlooks configuration option "menuitemstyle" is not supported and will be ignored.
/Users/annabelblue/.inkscape-etc/gtkrc:57: Clearlooks configuration option "listviewitemstyle" is not supported and will be ignored.
/Users/annabelblue/.inkscape-etc/gtkrc:58: Clearlooks configuration option "progressbarstyle" is not supported and will be ignored.

** (inkscape-bin:1968): CRITICAL **: Inkscape::XML::Document* sp_repr_read_file(const gchar*, const gchar*): assertion `Inkscape::IO::file_test( filename, G_FILE_TEST_EXISTS )' failed

** (inkscape-bin:1968): WARNING **: Unable to read keys file Contents/Resources/keys/default.xml

(inkscape-bin:1968): Gtk-WARNING **: Unable to rename '/Users/annabelblue/.recently-used.xbel': No such file or directory
Unable to find: org.inkscape.help.manual
Unable to find: org.inkscape.help.keys
Unable to find: org.inkscape.help.askaquestion
Unable to find: org.inkscape.help.commandline
Unable to find: org.inkscape.help.faq
Unable to find: org.inkscape.help.relnotes
Unable to find: org.inkscape.help.reportabug
Unable to find: org.inkscape.help.svgspec

** (inkscape-bin:1968): WARNING **: Null pixbuf for 0x33e3a90 [Contents/Resources/icons/remove-color.png]

(inkscape-bin:1968): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion `GDK_IS_PIXBUF (pixbuf)' failed

(inkscape-bin:1968): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion `GDK_IS_PIXBUF (pixbuf)' failed

(inkscape-bin:1968): Gtk-WARNING **: Could not find the icon 'object-visible'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
 http://icon-theme.freedesktop.org/releases

(inkscape-bin:1968): Gtk-WARNING **: Attempting to store changes into `/Users/annabelblue/.local/share/recently-used.xbel', but failed: Failed to create file '/Users/annabelblue/.local/share/recently-used.xbel.USI46W': No such file or directory

(inkscape-bin:1968): Gtk-WARNING **: Attempting to set the permissions of `/Users/annabelblue/.local/share/recently-used.xbel', but failed: No such file or directory
logout

[Opération terminée]

Can you help? I really would like to use the extensdions.
Annabelle

Revision history for this message
Jasper Frumau (jfrumau) said :
#16

I am having the same issue. I have the latest XQuartz X1 Window manager 2.7.5 and the latest Inkscape installed - 0.48 - using the package from Inkscape. I am running OSX Mavericks 10.9.1 and Python based on Macports' version:
python --version
Python 2.7.6
I installed lxml via MacPorts and I should be able to use the filter to embed all images, but I get
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

Any ideas?

Revision history for this message
Jasper Frumau (jfrumau) said :
#17

Never mind. Adding export VERSIONER_PYTHON_VERSION=2.6 to the shell scripts as recommended here above, restarting X11 and Inkscape did work for my setup as well. :-)

Revision history for this message
david kearley (6-m9il-b) said :
#18

This has fixed my issue with DXF, many thanks

Dave

Revision history for this message
Alan Mann (manna4881) said :
#19

This solved my problem, too.
Many Thanks.

Revision history for this message
Panagiotis Issaris (t4k1s) said :
#20

Thanks suv!

That worked fine on my Mac running OS X 10.9.3 and Inkscape 0.48.2 r9819.

Revision history for this message
Ignacio Alvarez (ignalvarez) said :
#21

Hi, I am get the same problem with:
OSX 10.9.4
Inkscape 0.48.5 r10040
XQuartz 2.7.7 (xorg-server 1.15.2)
python --version: Python 2.7.8
The message, when I try to run sozi from Inkscape is:

"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 suppose there is a PATH problem, but I cannot find where I have to add the needed one.

Could you help me? [many thanks, Ignacio]

Revision history for this message
su_v (suv-lp) said :
#22

On 2014-09-19 17:18 , Ignacio Alvarez wrote:
> Question #194132 on Inkscape changed:
> https://answers.launchpad.net/inkscape/+question/194132
>
> Ignacio Alvarez requested more information:
> Hi, I am get the same problem with:
> OSX 10.9.4
> Inkscape 0.48.5 r10040
> XQuartz 2.7.7 (xorg-server 1.15.2)
> python --version: Python 2.7.8
> The message, when I try to run sozi from Inkscape is:
>
> "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 suppose there is a PATH problem, but I cannot find where I have to add
> the needed one.
>
> Could you help me? [many thanks, Ignacio]
>

Sozi is not supported out-of-the-box with Inkscape 0.48.5 on OS X - this
custom external extension requires PyGtk which is not included in the
application bundle because inkscape's own extensions use the internal
GUI and not PyGtk for dialogs.

I assume that you followed some random instructions found on the web,
likely based on some older package of Inkscape for OS X - without
details on what you already modified (inside the app bundle) and
installed outside of the app bundle, I'm sorry but there is no easy help
to provide (too many unknowns).

Your question is also off-topic for this thread (which is about a known
issue with an older package (Inkscape 0.48.2 for Mac OS X) - this known
issue was fixed in the current stable release package 0.48.5 for Mac OS X).

Revision history for this message
Ignacio Alvarez (ignalvarez) said :
#23

O.K., many thanks and sorry to introduce noise to the thread.

Revision history for this message
su_v (suv-lp) said :
#24

On 2014-09-19 19:18 , Ignacio Alvarez wrote:
> O.K., many thanks and sorry to introduce noise to the thread.

Sorry for not being more supportive. For starters, see

https://answers.launchpad.net/inkscape/+question/179289#comment-10

(the instructions had been written for 0.48.2, but probably work with
0.48.5 too: install the dependencies for sozi via Macports (at least
py27-lxml, py27-numpy, py27-pygtk), and create/modify the two files as
described).

Can you help with this problem?

Provide an answer of your own, or ask Darren Lennard for more information if necessary.

To post a message you must log in.