[Pyobjc-dev] objc 2.2 and libxml2?
Brought to you by:
ronaldoussoren
From: Glenn <grp...@so...> - 2009-12-08 20:03:06
|
Hi, I've done a framework install of Python 2.6 on OSX10.5 and it works just fine. To enable Cocoa/Python apps, I've installed pyobjc 2.2 and that works well enough that the native MacOSX backend in matplotlib runs properly. However, when I try running my own app with Xcode, I get the following traceback: [Session started at 2009-12-08 10:24:30 -0800.] Traceback (most recent call last): File "main.py", line 10, in <module> import objc File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.3-fat.egg/objc/ __init__.py", line 22, in <module> _update() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.3-fat.egg/objc/ __init__.py", line 19, in _update import _objc ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/ lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.3-fat.egg/ objc/_objc.so, 2): Library not loaded: /usr/lib/libxml2.2.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/2.6/ lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.3-fat.egg/ objc/_objc.so Reason: Incompatible library version: _objc.so requires version 10.0.0 or later, but libxml2.2.dylib provides version 9.0.0 2009-12-08 10:24:30.364 py1[960:10b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '/Users/ glenn/learningcocoa/py1/main.m:44 main() PyRun_SimpleFile failed with file '/Users/glenn/learningcocoa/py1/build/Debug/py1.app/Contents/ Resources/main.py'. See console for errors.' So, to fix this, I installed the latest version of libxml2.2.dylib in / usr/local/lib. Unfortunately, subsequent installation of the latest distribution of Pyobjc doesn't fix the problem: easy_install pyobjc==2.2 => /Library/Frameworks/Python.framework/ Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6- macosx-10.3-fat.egg because that contains a precompiled _objc.so that is linked to /usr/ lib/libxml2.2.dylib. What is the canonical way to get a framework install of pyobjc 2.2 working properly in Python 2.6 on OS-X 10.5? I've read horror stories about breaking system apps if /usr/lib/libxml2.2.dylib is messed with. Glenn |