[PEAK] installation troubles / how to uninstall setup tools

Karl Pietrzak kap4020 at rit.edu
Thu Feb 9 18:31:38 EST 2006

On Thursday 09 February 2006 18:04, Phillip J. Eby wrote:
> I see your point.  Having been working on setuptools and eggs for almost a
> year now, it's easy to become blind to the obvious.  :)  I'm trying to
> recruit volunteers to help pull out a separate "quickstart/FAQ" page for
> folks in your situation, although with the bugs you encountered, it
> wouldn't have helped (except for saying where to send problem reports).

Ah, yes, that would be nice.  I could give the Quickstart guide a quick read 
through once it's finished.

> > > It appears there is something unusual about your setup.  Normally,
> > > Python expects its libraries to be in
> > > $PREFIX/lib/python2.4/site-packages, and there isn't any way for
> > > setuptools to tell that your particular installation has an unusual
> > > directory layout, or at least not any obvious way that I know of at
> > > present.
> >
> >Can't you just do this?
> >
> >def determineSitePackagesDirectories():
> >         listOfDirectories = []
> >         for dir in sys.path:
> >                 if os.path.isdir(dir) and os.path.basename(dir) ==
> > 'site-packages':
> >                         listOfDirectories.append(dir)
> >         return listOfDirectories
> Unfortunately, it's not enough to know if the directory's *name* is
> site-packages.  The crucial variable is whether the directory is being
> processed by Python for .pth files at startup.  This is how setuptools
> supports having both "default" and "on-demand" versions of a package
> installed at the same time.

After reading http://docs.python.org/lib/module-site.html, I got the 
impression that the site-packages directory is _the_ directory from 
which .pth files are read, and nowhere else.

Is this not true?

On my machine, I have a bunch of .pth files, and they're all in the same 


> I am, however, working on making this a more painless process.  The fact
> that most Linux distros patch Python in mutually incompatible ways doesn't
> help much, though.  :(

Could you elaborate on the myriad "mutually incompatible ways" distros patch 
Python?  I'm curiously because I'm in the process of writing an article on 
such things.

> Create or edit /usr/lib64/python2.4/distutils/distutils.cfg, with these
> lines:
> [easy_install]
> site_dirs = /usr/lib64/python2.4/site-packages
> That's it; the --site-dirs will now be automatic on your machine.

I think it works!

# easy_install
error: No urls, filenames, or requirements specified (see --help)

More information about the PEAK mailing list