[Distutils] EasyInstall: easy-install.pth, active version

Phillip J. Eby pje at telecommunity.com
Mon May 30 00:31:16 CEST 2005

At 04:49 PM 5/29/2005 -0500, Ian Bicking wrote:
>Reading through "Changing the Active Version (site-packages installs
>only)", I'm guessing that the implementation changes easy-install.pth to
>point to a specific version.  But no easy-install.pth is created when
>you use the --install-dir option.  And maybe that's just an oversight...
>it seems like it easy-install.pth makes just as much sense in a local
>directory as site-packages...?

Unfortunately, Python only recognizes .pth files in "site" directories such 
as site-python and site-packages.  This includes the 
$HOME/Library/Python2x/site-packages directory on OS X, if it's the 
'Python.framework' build.

In principle you can  'import site; site.addsitedir("foo")' in order to 
work around this, but at that point you might as well just import 
pkg_resources and require() what you want.

Bob Ippolito has been pushing for Python to recognize .pth everywhere, or 
at least everywhere that's on sys.path at startup, IIUC.  However that 
won't be till Python 2.5 at the earliest, so in the meantime it would be 
misleading to imply that --install-dir could work without implying 

More information about the Distutils-SIG mailing list