Comment 2 for bug 168440

Krolco (krolco) wrote :

Originator: NO

I had the exact same problem.

Here's a bit more info, which hopefully should make this more clear.
I am using a "stock" OSX 10.4.9, which by default includes Python 2.3.5.

I used Inkscape 0.45.1-1 Tiger Universal .DMG to obtain Inkscape.

I tried doing a "Save As" to "DXF", and I got the same error message ("The
inkex.py module requires PyXML").

So I downloaded PyXML 0.84 .dmg, but that requires Python 2.4 or higher.

So I downloaded python-2.4.4-macosx2006-10-18.dmg from pythonmac.org to
install python 2.4.4, which by default goes into /usr/local (instead of
just /usr).

Then I installed PyXML, using all the "default" options. So far so good.

Now, I had already modified my .bash_login file to include /usr/local/bin
in my path. After install, Python 2.4.4 seems to be working fine.

Here is my 'echo $PATH':

/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/bin:/sbin:/usr/bin:/usr/sbin

Here is my 'which python':

/Library/Frameworks/Python.framework/Versions/Current/bin/python

Both of these were echoed from Terminal.

Now, I discovered that the paths were different between Terminal and
xterm... it looks to me like xterm doesn't honor the .bash_login file.

 So I copied some relevant path stuff to .bashrc, and restarted X11. Here
are the same commands run from the X11 command path now:

'echo $PATH':

/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/X11R6/bin

'which python':

/Library/Frameworks/Python.framework/Versions/Current/bin/python

Now, even after these changes, when I run Inkscape 0.45.1-1 and try to
"Save As" to .DXF, I still get the same error.

That suggests to me that Inkscape is not starting up with the correct
environment somehow. I don't know how to troubleshoot it beyond that.

I tried the original poster's suggestion of setting the display and
starting Inkscape from the command line, and it indeed works correctly
under those conditions. Because I already had the correct path set for
python 2.4 (and pyxml), I only needed to set the display export and start
inkscape with these commands:

export DISPLAY=0:0
/Applications/Inkscape.app/Contents/MacOS/Inkscape

And then everything works OK.

I hope this info helps; I'd be happy to go into more detail about this.