[Pythonmac-SIG] expat.py broken in Python 2.5
Ned Deily
nad at acm.org
Mon Mar 31 00:10:43 CEST 2008
In article
<d4c0d4800803300853x4ac58ddbi3ef6dab96a7606b at mail.gmail.com>,
"Stewart Midwinter" <stewart at midwinter.ca> wrote:
> In the lastest python 2.5 build for Macintosh, the pyexpat module binary is
> not available to Mac users with Intel processors. If you try to import it,
> you get an error saying that the binary is for PPC architecture only. This
> is a bug introduced in Python 2.5, since it does not exist in Python 2.4.
>
> How can we go about fixing this?
>
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
> /_xmlplus/parsers/expat.py",
> line 4, in <module>
> from pyexpat import *
> ImportError:
> dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pa
> ckages/_xmlplus/parsers/pyexpat.so,
> 2): no suitable image found. Did find:
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
> _xmlplus/parsers/pyexpat.so:
> mach-o, but wrong architecture
Note the path. The module being imported is from site-packages, not the
standard library. Looks like you have an old third-party xml package
installed that's being loaded instead of the standard one.
--
Ned Deily,
nad at acm.org
More information about the Pythonmac-SIG
mailing list