MySQLdb won't install as non-root on Python 2.6 because
its "setup.py" file requires "setuptools". "setuptools",
unlike "distutils", isn't part of the Python 2.6 distribution.
IMPORTANT PACKAGES SHOULD NOT USE "setuptools". Use the
standard "distutils". "setuptools" and "eggs" create more
problems than they solve. "setuptools" has many built-in
assumptions about where things are supposed to be, and they're
There's an "ez_setup.py" available for MySQLdb. This tries to obtain and
install "setuptools". But it wants too many privileges just to do a "build":
The following error occurred while trying to add or remove files in the
[Errno 2] No such file or directory:
That's because "setuptools" has a built-in ego trip of insisting that
it should be installed globally. I'm running a freshly-built, but not
"installed" version of Python 2.6. I'm trying to install a test version
of Python2.6 with some packages without running as root on a live server.
It's not just MySQLdb that's broken by "setuptools". See these
examples of other installation problems created by "setuptools":
As soon as "setuptools" becomes involved, unnecessary headaches appear.
DO NOT USE SETUPTOOLS. Either use "distutils", or go all the way and
provide a RPM for Linux and a .exe for Windows.