From my investigations it turns out that some eggs are packaged as zip files, and are saved as such in Python’s site-packages directory.
These zipped eggs need to be unzipped before they can be executed, so are expanded into the PYTHON_EGG_CACHE directory which by default is ~/.python-eggs (located in the user’s home directory). If this doesn’t exist it causes problems when trying to run applications.
There are a number of fixes:
- Create a
.python-eggsdirectory in the user’s home directory and make it writable for the user. - Create a global directory for unzipping (eg.
/tmp/python-eggs) and set the environment variablePYTHON_EGG_CACHEto this directory. - Use the
-Zswitch when usingeasy_installto unzip the package when installing.