[Pythonmac-SIG] /System/Library vs /Library
Bob Ippolito
bob at redivi.com
Tue May 25 15:22:03 EDT 2004
On May 25, 2004, at 3:08 PM, Glenn Andreas wrote:
> Just so hopefully nobody else hits this problem.
>
> If you have a system that started life as a 10.2 system with python
> added on, upgraded to 10.3 and run an application that embeds/links to
> Python.framework, things might not work as expected.
>
> The 10.2 add-on python gets installed in
> /Library/Frameworks/Python.framework. 10.3 provides
> /System/Library/Frameworks/Python.framework. If your app is linked to
> Python.framework, it will end up with the 10.2 version of
> Python.framework, and not the 10.3 one, since /Library/Frameworks is
> searched before /System/Library/Frameworks (see
> http://developer.apple.com/documentation/MacOSX/Conceptual/
> BPFrameworks/Tasks/InstallingFrameworks.html#//apple_ref/doc/uid/
> 20002261/TPXREF101).
>
> Even though both of these probably are 2.3 python, if you use PackMan
> in SLFP to install a module (say, PyObjC), your app that embedded
> Python via Python.framework won't see it, since it will end up looking
> in LFP. You will then swear, remove things, re-install things, try to
> figure out why system.path on the /usr/bin/python works correctly (and
> refers to the site package in SLFP where you just installed PyObjC),
> yet your app is unable to import something you know that you just
> installed.
We're very aware of it. This is why we have "how to remove a jaguar
python" in the FAQ. The linking-to-the-wrong-framework problem is
compounded by the fact that if you do have both pythons and you link a
module intended for one from the other then you will have *both* python
images in memory and you'll get a version mismatch.
The linking-to-the-wrong-framework problem should be solved for later
versions of Python 2.3 (I'm not sure which exactly, but I am relatively
sure that 2.3.3 included the -F fix). The latter problem has a
solution for users of Mac OS X 10.3+ and I've produced a patch but it
is not in CVS, last I checked.
-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040525/8a9d7fe9/smime.bin
More information about the Pythonmac-SIG
mailing list