2009-11-07 Python

I was writing a little Google Wave Robot, which required me to install a new Python. This went well, and I was able to follow the Google Wave tutorial.

Today I wanted to follow my own instructions for creating a hex map – but I got an error message:

creating a hex map

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

http://cheeseshop.python.org/pypi/lxml/

Whoa, I thought this worked before? I’m using Mac OS 10.4 and installed Python 2.6.4 yesterday. Or did the Inkscape Boardgames Extensions only work on my laptop with the even older Mac OS 10.3?

So I try to install lxml 2.2.3 but I fail. Running `make` gets me lots of errors (”src/lxml/lxml.etree.c:130090: error: dereferencing pointer to incomplete type”) and running `ez_setup.py` followed by `easy_install lxml` produces the same problems. Apparently the pregenerated lxml.etree.c will not work for me!

lxml 2.2.3

But wait... I didn’t install libxml 2.7.2 or later, nor did I install libxslt 1.1.15 or later. This is going to take longer… 🙁

While the stuff is building in the background, I fixed my map manually using some old-fashioned copy & paste and some editing of the SVG file using Emacs and some keyboard macros. Yay Emacs! 😄

Oh, and while libxml and libxslt compiled effortlessly, lxml for Python ended with “_usr_bin/ld: for architecture ppc _usr_bin/ld: warning _usr_local/lib/libxslt.dylib cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)” – but I’m no longer going to try and get it to work.

​#Python ​#Software

Comments

(Please contact me if you want to remove your comment.)

Good luck trying the same on 4 or 7 year old linux distriburion releases!

– Harald Wagener 2009-11-07 22:55 UTC

Harald Wagener

---

btw, what kind of extension did you write? Is it available?

– Harald Wagener 2009-11-07 23:03 UTC

Harald Wagener

---

It was going to be a robot that would save the first blip as a page onto an Oddmuse wiki. But my robot doesn’t seem to react to BLIP_SUBMITTED events. Very annoying.

– Alex Schroeder 2009-11-08 10:53 UTC

Alex Schroeder