[solved] PyXML and Mac OSX

Post questions on how to use or achieve an effect in Inkscape.
Curtis

[solved] PyXML and Mac OSX

Postby Curtis » Thu Feb 14, 2008 4:25 am

Hallo,

I installed PyXML on my Leopard mac. When starting some effects I get:

The inkex.py module requires PyXML. Please download the latest version from <http://pyxml.sourceforge.net/>.

noname:~curtis$ ls -la /Library/Python/2.5/site-packages/
total 16
drwxrwxr-x 5 root admin 170 13 Feb 19:17 .
drwxrwxr-x 3 root admin 102 9 Okt 04:33 ..
-rw-r--r-- 1 root admin 319 13 Feb 19:17 PyXML-0.8.4-py2.5.egg-info
-rw-rw-r-- 1 root admin 119 6 Okt 06:11 README
drwxr-xr-x 16 root admin 544 13 Feb 17:50 _xmlplus

What can I do?

Aprentic
Posts: 3
Joined: Sat Feb 16, 2008 1:26 pm

Re: PyXML and Mac OSX

Postby Aprentic » Sun Feb 17, 2008 5:51 am

The 0.46 release notes say "All Python effects are switched from the old and unmaintained PyXML library to the new powerful lxml library."
Unfortunately I can't seem to get the python packages working.
I'm running OS X 10.5.2 and I've tried the stable release and Inkscape-17338-i386.dmg
I tried different variations of copying the python packages to the resources/python directory but it doesn't seem to be working.
That said my only test is that when I try to run TexText I keep getting an error message saying that it's looking for PyXML.
Is there a way for me to test if I've got the Python packages installed?
Maybe it's actually a bug with TexText?

User avatar
pixabella
Posts: 53
Joined: Sat Oct 13, 2007 5:52 am
Contact:

Re: PyXML and Mac OSX

Postby pixabella » Sun Feb 17, 2008 7:58 am

Hi all,

Mac user here. I am running Leopard, latest X11 and the dev vers 15th Feb for Inkscape.

I have tried playing with text effects, random case through the menu and I keep getting this msg: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 have found that effects have been a problem with all the builds I have used. Is it possible to release a complied version of Inkscape for Mac Leopard users with Python built in? Sorry if it is a stupid question, but I have to ask. I am really keen to have a play. ;)

Aprentic
Posts: 3
Joined: Sat Feb 16, 2008 1:26 pm

Re: PyXML and Mac OSX

Postby Aprentic » Mon Feb 18, 2008 9:20 am

Hmm.
sudo apt-get install python-lxml fails
as does
sudo fink install python-lxml
I was also unable to find lxml using "fink list"
However I was able to get libxml2 and libxslt
I also downloaded lxml and tried
sudo easy_install lxml but it gives me a whole bunch of errors which I'm still trying to figure out.

CaF

Re: PyXML and Mac OSX

Postby CaF » Mon Mar 31, 2008 8:11 pm

You need pyxml. But for pyxml to work you need to define the global variable PY_USE_XMLPLUS (see http://aarone.org/2008/01/17/pyxml-on-leopard/)
Then you also need the pdflatex command to be available. For this set PATH so that you can find it.

In short add this lines into the file "script" inside the Inkscape bundle under Contents/Resources/script

## In order to py-xml to work needed for the textext Inkscape plugin
export PY_USE_XMLPLUS=YES
## set your path so that pdflatex is avalaible
export PATH=/usr/local/bin:/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin:/usr/X11R6/bin


[I have copied my whole path as I have it from bash making echo $PATH in a terminal. Remember to change it appropriately in your case so that you can find pdflatex in the PATH]


Return to “Help with using Inkscape”