[Tutor] Location of modules in Mac OS X

Alan Gauld alan.gauld at btinternet.com
Mon Oct 1 19:59:03 CEST 2007


"Roy Chen" <roychenlei at gmail.com> wrote

> I'm using MacPython 2.5 on OS X 10.4.
>
> I was just wondering if all the Python modules are contained in this
> directory:
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/

The standard library modules are. Any custom moidules could
be almost anywhere!

> Also, I've installed the Python Image Library (PIL), and it seems to
> be installed in this folder:
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
> packages/PIL/
>
> Are all external Python modules installed guaranteed to be in this
> folder?

site-packages is the usual place but some authors don't provide
an install script so they could be anywhere that you unpack them.
A few others write unconventional scripts and put them someplace
else (maybe inside their own applications area). Welcome to the
world of Opensource where rules are "flexible" But mostly they
are followed OK. :-)

BTW ISTR that a few Mac specific packages found thir way
someplace else, but I can't recall which ones. Sherlock found
them for me...

Alan G. 




More information about the Tutor mailing list