[Distutils] Package install failures in 2.6.3 - setuptools vs Distribute

Tarek Ziadé ziade.tarek at gmail.com
Sat Oct 3 15:49:30 CEST 2009

On Sat, Oct 3, 2009 at 2:15 PM, Lennart Regebro <regebro at gmail.com> wrote:
> 2009/10/3 Ned Deily <nad at acm.org>:
>> I'm afraid there is going to be a small deluge of very confused users
>> who will end up needing to install Distribute but only when they
>> eventually figure out why some packages with C extensions mysteriously
>> no longer install after they upgrade to python 2.6.3.  For example,
>> following the package instructions to use setuptools easy_install, an
>> easy_install lxml fails with 2.6.3 with the very cryptic:
>> File "build/bdist.macosx-10.3-fat/egg/setuptools/command/build_ext.py",
>> line 85, in get_ext_filename KeyError: 'etree'
>> http://stackoverflow.com/questions/1512530/cant-install-lxml-python-2-6-3
>> -osx-10-6-snow-leopard
>> Appscript is another package that fails similarly.  There must be others.
> I can confirm this. It seems to be packages that use c-extensions.
> zope.interface also breaks.

Yes Setuptools makes some assumptions on how distutils APIs are called
and in which order. Once bitbucket is up, you can look at the details
on the fix
I did, it's fairly simple.

Notice that this has been fixed in Ubuntu already with a patched version
of setuptools, but the next probable step is to use Distribute there
and in debian.

>>  $ curl -O http://nightly.ziade.org/distribute_setup.py
>>  $ python distribute_setup.py
> Distribute doesn't break, though, so "sudo easy_install Distribute"
> seems to be enough. :-)

Yes that's the simplest way to fix the problem.

Notice that setuptools patches distutils in other places, and it will
not work with Python 2.7 and 3.2
where Distribute does.


Tarek Ziadé | http://ziade.org | オープンソースはすごい! | 开源传万世,因有你参与

More information about the Distutils-SIG mailing list