[New-bugs-announce] [issue4865] system wide site-packages dir not used on Mac OS X

Karsten Petersen report at bugs.python.org
Wed Jan 7 13:51:02 CET 2009

New submission from Karsten Petersen <kapet at kapet.de>:

[Guido asked me to file this as an issue.]

On Mac OS X Apple has configured the system provided Python to also
search this global site-packages directory:

This allows users to install their own system-wide packages there (and
not have them to drop into /System/Library/Frameworks/Python....../).

Unfortunately if you install Python from python.org (or pythonmac.org)
it is not searching this path, it only searches the site-packages
directory _within_ its own framework:
That directory is of course not searched by the Apple provided Python.

This is an issue for addon package installers (think PIL or numpy): 
There is no single path that will be found by both the system provided
Python and a Python installed from python.org.  This makes most/all (?)
of the pre-built packages on pythonmac.org unusable with the version of
Python Apple ships although there is no version conflict or such - it
simply installs stuff in the "wrong" directories.

Many people who tried to install PIL for Django or App Engine stumbled
into this.  The system provided Python version was fine.  But compiling
PIL is hard.  So they installed PIL from pythonmac.org.  That couldn't
be found by Python.  Now some people manually copied stuff around, some
created symlinks, some installed a second Python 2.5.  (The lucky ones
picked a Python download from python.org, the not so lucky ones
installed the 2.5.0 release from pythonmac.org...)

I've attached a diff of a stock Python 2.5.1 library against what I
found on my Apple Mac OS X 10.5 (Leopard) system.  I've dropped changes
that are not related to the path.

components: Library (Lib), Macintosh
files: apple.diff
keywords: patch
messages: 79329
nosy: kapet
severity: normal
status: open
title: system wide site-packages dir not used on Mac OS X
type: behavior
Added file: http://bugs.python.org/file12637/apple.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list