site packages and /System/Library

Paul Sargent psarge at gmail.com
Thu Nov 15 07:11:37 PST 2007


Ok, forgive my glib remark in that post.

I did my path dump on a 10.5 system, and it looks like you're on 10.4.

Looks like Apple got it wrong in Tiger, not providing a site-packages  
directory outside of system. This appears to be fixed in Leopard.

If you have python installed from Macports (which I also have) it  
seems that the site-packages path is (for python 2.4):

'/opt/local/lib/python2.4/site-packages'

I expect it's something similar for their 2.5 package, but I don't  
have a need to install it. It'd be nice if they also included the  
Apple one, but I don't know if that's practical.

On 14 Nov 2007, at 21:16, David Worrall wrote:

> Unsurprising? perhaps if you're telepathic:
>
> >>> import sys
> >>> print sys.path
> ['',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python23.zip',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/plat-darwin',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/plat-mac',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/plat-mac/lib-scriptpackages',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/lib-tk',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/lib-dynload',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/site-packages',
> '/System/Library/Frameworks/Python.framework/Versions/2.3/Extras/lib/ 
> python']
>
> which doesn't include a
> '/Library/Python/2.3/site-packages'
>
> Following Paul's lead, however
> /Library/Python/2.3/site-packages
> has a lovely little README
> and is in the path
> So why doesn't /Library/Python/2.3/site-packages show up in sys.path?
>
> Fairly surprising, really.
>
>
> On 15/11/2007, at 2:56 AM, Paul Sargent wrote:
>
>>
>> On 14 Nov 2007, at 13:16, David Worrall wrote:
>>>
>>> What is the correct location for 3rd party site-packages to be  
>>> used with the system python?
>>
>> >>> import sys
>> >>> print sys.path
>> ['',
>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
>> python25.zip',
>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
>> python2.5',
>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
>> python2.5/plat-darwin',
>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
>> python2.5/plat-mac',
>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
>> python2.5/plat-mac/lib-scriptpackages',
>> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/ 
>> lib/python',
>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
>> python2.5/lib-tk',
>> '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
>> python2.5/lib-dynload',
>> '/Library/Python/2.5/site-packages',
>> '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/ 
>> lib/python/PyObjC']
>>
>> Looks like /Library/Python/2.5/site-packages
>>
>> Fairly unsurprising really.
>>
>
> _________________________________________________
> experimental polymedia:	www.avatar.com.au
> Sonic Communications Research Group,
> University of Canberra:	 creative.canberra.edu.au/scrg/
>
>
> _______________________________________________
> MacOSX-dev mailing list
> MacOSX-dev at omnigroup.com
> http://www.omnigroup.com/mailman/listinfo/macosx-dev



More information about the MacOSX-dev mailing list