With 0.6.25, the script launchers were updated to be loaded from the package (so they could be converted to Python 3 during the package conversion). However, this also meant that they needed to be decoded to unicode when loaded.
The simple act of invoking ''.decode in distribute gives rise in some cases to an AttributeError. The underlying issue is that a module (such as encodings.utf_8) will be finalized (have its globals set to None) if it is removed from sys.modules.
Due to the way the setuptools.sandbox works, if encodings.utf_8 was not in the globals when the sandbox is created (often before the user's setup.py is invoked), it will be removed from sys.modules and will cause subsequent invocations of ''.decode('utf-8') to fail.
Distribute should be more careful about which modules it removes, at least in the encodings.