[Pythonmac-SIG] MacPython & Leopard: Which 'site-packages' folder to use?

Larry Meyn larry.meyn at nasa.gov
Thu Jun 26 22:19:52 CEST 2008




On 6/26/08 12:10 PM, "Russell E. Owen" <rowen at cesmail.net> wrote:

> In article 
> <af8ce7040806251515y6647490ei8b9621f1f678dffe at mail.gmail.com>,
>  "Rob Gabaree" <rob at rawb.net> wrote:
> 
>> Hello,
>> 
>> With Leopard's built-in Python, user-installed modules are placed in
>> /Library/Python/2.5/site-packages/.
>> 
>> If I'm using MacPython, should I avoid putting anything into this
>> directory and use
>> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages
>> instead?
>> 
>> I'd just like to double check. I noticed the former path wasn't in
>> sys.path when I looked, but I wasn't sure if it was accidentally left
>> out by mistake.
>> 
>> Thanks for the help,
> 
> If you are using MacPython then use
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-pack
> ages.
> 
> The two pythons do not share installed packages. This is probably good;
> you avoid endangering the system python and you can upgrade to python
> 2.6 or 3.0 when you are ready without installing packages that are
> incompatible with the system python.
> 
> -- Russell
> 

Additional Info:
While you can use the system python and install modules in
/Library/Python/2.5/site-packages/, you cannot install new versions of the
pre-installed modules that are stored in
/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/
(You can install new versions, but the system python checks its own folder
first.)  Several modules such as numpy and wxPython are in the system
python's extras library.  Since I like to update these from time to time,
I've abandoned the system python and use a framework install instead.  One
drawback to a user-installed python is that you lose access to some
system-python only modules like CoreGraphics.

--Larry



More information about the Pythonmac-SIG mailing list