[Pythonmac-SIG] which directory for site-packages

Hunt Culver hculver at cfl.rr.com
Sat Nov 15 19:15:20 CET 2008


Hi all,

I cannot seem to get my Mac to find the site-packages directory for  
MacPython 2.5.

Below is some relevant info from terminal.  The first path in $PATH is  
somehow being applied during startup (by some other process, I presume  
MacPython.) and it is pointing to the lib directory.


The /usr/bin/python is an alias pointing to /Library/Frameworks/ 
Python.framework/Versions/2.5/bin/python2.5 -- that's the bin directory

Then from within python I printed all the the sys.paths and  
sys.prefix.  I tried to create a site-packages sub directory in
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5 , but python doesn't seem to find it automatically.


[Macintosh:~] huntculver% echo $PATH
/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5:Macintosh:HD/Users/huntculver/.MacOSX:/usr/bin:/bin:/usr/ 
sbin:/sbin:/usr/local/bin:/usr/X11/bin
[Macintosh:~] huntculver% which python
/usr/bin/python
[Macintosh:~] huntculver% python
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> import sys
 >>> for i in sys.path:
...  print i
...

/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
/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/ 
python/PyObjC
 >>> sys.prefix
'/System/Library/Frameworks/Python.framework/Versions/2.5'



any suggestions?


Thanks,



More information about the Pythonmac-SIG mailing list