[Distutils] How to force installing setuptools instead of distribute ?

David Cournapeau cournape at gmail.com
Thu Jul 1 04:35:08 CEST 2010

On Thu, Jul 1, 2010 at 11:23 AM, P.J. Eby <pje at telecommunity.com> wrote:
> At 11:10 AM 7/1/2010 +0900, David Cournapeau wrote:
>> Hi,
>> Ubuntu Lucid uses distribute instead of setuptools, and I cannot
>> manage to use setuptools with virtualenv because of this. I upgraded
>> to the last version of virtualenv, which claims to install setuptools
>> by default, but I still get distribute instead, and I would guess this
>> is because of Ubuntu using distribute, but who knows....
>> Is there a simple way to force virtualenv to install setuptools (the
>> PJE version, *not* the distribute fork) ?
> Have you tried requesting an exact version number of setuptools? (e.g.
> setuptools==0.6c11 or setuptools==dev06)

I have tried that, but easy_install considers it does not need it
because distribute has a version higher (0.6.13):

install_dir /home/david/src/rt_analytics/tmp/lib/python2.6/site-packages/
Searching for distribute
Best match: distribute 0.6.13
Processing distribute-0.6.13-py2.6.egg
distribute 0.6.13 is already the active version in easy-install.pth
Installing easy_install script to /home/david/src/rt_analytics/tmp/bin
Installing easy_install-2.6 script to /home/david/src/rt_analytics/tmp/bin

Using /home/david/src/rt_analytics/tmp/lib/python2.6/site-packages/distribute-0.6.13-py2.6.egg
Processing dependencies for distribute
Finished processing dependencies for distribute

> (Distribute uses a hack of pkg_resources to pretend that it satisfies
> requirements that specify "setuptools".  However, I don't think it fakes
> what *version* of setuptools it pretends to be.)

Yes, that's the core of the issue. Setuptools does not seem so
obnoxious anymore... this is quite infuriating.


More information about the Distutils-SIG mailing list