Python2.2 and expat

Gerhard Häring gerhard at bigfoot.de
Thu Mar 14 22:10:22 EST 2002


Colin Fox wrote in comp.lang.python:
> Hello, everyone.
> 
> I'm trying to build garnome, which requires Python2.2 + Python2.2-xml.
> I've got Python2.2 built, but for some reason it doesn't seem to build
> expat. And when I try to "import xml.parsers.expat" I get:
> 
>>>> import xml.parsers.expat
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/local/lib/python2.2/xml/parsers/expat.py", line 4, in ?
>     from pyexpat import *
> ImportError: No module named pyexpat
> 
> Where is pyexpat supposed to come from? 

It's part of the standard Python 2.2 sources and it is built ok if
you've installed expat *and* the expat development files. Chances are
that Python didn't find the expat headers during build.

If you're using Linux, there's often a seperate package expat-devel or
some such.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list