logo       

Re: /System/Library vs /Library: msg#00137

python.apple

Subject: Re: /System/Library vs /Library

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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@xxxxxxxxxx
http://mail.python.org/mailman/listinfo/pythonmac-sig
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise