Hey folks - I'm trying to get a newer MySQLdb installed on a Debian Sarge box, with the goal of getting Django set up. I did an easy_install MySQL-python and it seemed to go fine. The problem is, when I try to fire up Django, I get a weird situation. Alternating stack traces. That is, depending on (phase of moon? microseconds until 2038? the mood of cthulu?), I get one of the two scenarios:
1) A stack trace that ends in:
ImproperlyConfigured: Error loading MySQLdb module: bad local file header in /usr/lib/python2.4/site-packages/MySQL_python-1.2.2-py2.4-linux-i686.egg
or 2) A stack trace that ends in:
ExtractionError: Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg
cache:
The Python egg cache directory is currently set to:
/root/.python-eggs
Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
Admittedly, I'm still pretty new to eggs, so perhaps I'm doing something wrong there?
Help! :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok - nevermind folks. After a bit more reading (and a couple hours sleep), I get it. The egg gets put in place and each user who wants to use the module has to extract it to a local directory, which is either ~/.python-eggs, or wherever the PYTHON_EGG_CACHE env variable points. I follow. So I just set up apache with that environment variable and pointed it at a secure directory for doing that stuff.
Question though - is there a way to have the egg extracted in the system area so that individual users won't have to do it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey folks - I'm trying to get a newer MySQLdb installed on a Debian Sarge box, with the goal of getting Django set up. I did an easy_install MySQL-python and it seemed to go fine. The problem is, when I try to fire up Django, I get a weird situation. Alternating stack traces. That is, depending on (phase of moon? microseconds until 2038? the mood of cthulu?), I get one of the two scenarios:
1) A stack trace that ends in:
ImproperlyConfigured: Error loading MySQLdb module: bad local file header in /usr/lib/python2.4/site-packages/MySQL_python-1.2.2-py2.4-linux-i686.egg
or 2) A stack trace that ends in:
ExtractionError: Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg
cache:
[Errno 13] Permission denied: '/root/.python-eggs'
The Python egg cache directory is currently set to:
/root/.python-eggs
Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
Admittedly, I'm still pretty new to eggs, so perhaps I'm doing something wrong there?
Help! :)
Ok - nevermind folks. After a bit more reading (and a couple hours sleep), I get it. The egg gets put in place and each user who wants to use the module has to extract it to a local directory, which is either ~/.python-eggs, or wherever the PYTHON_EGG_CACHE env variable points. I follow. So I just set up apache with that environment variable and pointed it at a secure directory for doing that stuff.
Question though - is there a way to have the egg extracted in the system area so that individual users won't have to do it?
http://peak.telecommunity.com/DevCenter/EasyInstall#command-line-options
You should probably use --always-unzip or -Z