And each time I am very confused by it. Then I realize the problem. Then I solve it. Then I forget about it. Until the next time.
Your server cannot write to the PYTHON_EGG_CACHE path, and thus cannot use eggs. That's the entire problem right there.
Although you might need to install egenix-mx-base. I'm not even sure if it's relevant or just something I want to be
relevant as I tirelessly struggle against this error.
sudo easy_install egenix-mx-base
The real fix to this problem is in either your mod_python or mod_wsgi configuration files. For mod_wsgi a line like this should be added to your site's .wsgi file.
It doesn't need to be home/django/.python-eggs specifically, just somewhere that www-data can write to (for Ubuntu).
To check just su to www-data and give it a wack.
sudo su www-datacd /home/django/.python-eggsmkdir testrm -rf test
If that worked, then you're golden. Restart your server and get outa here. If you're using mod_python, then
you'll need to make this change in a different location. It's explained more fully here,
but basically you need to make a eggs.py file somewhere that contains these lines