[Distutils] setuptools requiring itself to run... thus not running

Phillip J. Eby pje at telecommunity.com
Thu Feb 9 00:33:03 CET 2006

At 02:27 PM 2/8/2006 -0800, Ben Bangert wrote:
>A user of one of my webapps reported that after running upgrade one
>night, setuptools was no longer functioning properly. Apparently it
>somehow got installed in multi-version mode, requiring pkg_resources
>to be imported *before* you could use setuptools. Which of course
>leaves it in the somewhat amusing state that it needs to import
>pkg_resources before it can import pkg_resources....

That's *very* odd.  EasyInstall has special code in there to write an extra 
setuptools.pth file, such that you can never *really* install setuptools in 
multi-version mode.  Even if it's not in easy-install.pth, it should always 
be in setuptools.pth.  The only way it should be able to do this is if you 
are installing to a directory that easy_install doesn't consider a "site" 

Judging from the output, my guess here would be that the standard algorithm 
for determining a site-packages directory location isn't working on this 
platform; it's probably coming up with /usr/lib/python2.4/site-packages 
instead.  They need to add:

site_dirs = /usr/lib64/python2.4/site-packages

to /usr/lib64/python2.4/distutils/distutils.cfg.  This file probably 
doesn't exist; just create it.

I'm really curious how this particular Python got built, such that it 
thinks /usr/lib64 is the place where this stuff goes.  There might be other 
problems, but from the output you provided I'm guessing that this is the 
only actual issue currently.  Certainly it's the most likely source of the 

More information about the Distutils-SIG mailing list