In article <d87dfa01-56f8-4e42-bd4b-af4184ae7...@lumen.nu>,
 Joost Rekveld <li...@lumen.nu> wrote:
> The problem with MacPorts is that it installs everything around its own 
> Python25, which is again in a different place and I don't know how to 
> persuade it to install PyObjc where I want it.

You don't.  A Python package, particularly one that contains C 
extensions, should only be used with the Python instance which it was 
built with and installed into.  There can be major differences in the 
build options between Python instances even at the same release level.  
So if you install a MacPorts PyObjC, you use the MacPorts python, too.  
 
> Independently I found this page:
> 
> <http://forums.macrumors.com/archive/index.php/t-377881.html>
> 
> and when I add this to my PythonPath:
> 
> /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyO
> bjC
> /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/py2
> app
>  
> it all seems to work: at least it seems now that I can import objc, AppKit, 
> QTKit
> tonight i'll be able to see whether it really works.
> 
> This workaround seems a bit dodgy to me, but it works ?

It's bad practice to follow.  In the absence of compatibility 
guarantees, the only safe approach is to install any missing modules you 
need into each Python instance where you need them.  And, while it is 
fine to install additional packages to the Apple-supplied pythons (these 
additional site packages are placed in /Library/Python), one should 
never try to remove or delete the Apple-supplied files (in /usr/bin and 
/System/Library).  They are part of OS X and managed by Apple.

-- 
 Ned Deily,
 n...@acm.org

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to