Looks like your python 2.5 had the python mysql packages installed, but
your new python 2.6 doesn't, which it wouldn't being a fresh install.
Now you need to install the python mysql bindings into python 2.6.
Also, you should probably have your libs in for python 2.6
in /usr/local/lib/python2.6/ rather than /usr/local/lib/python2.5/. You
can change where this all goes via the ./configure --prefix option in
the python build. By default this is set to /usr/local. If you set it
to /usr, it will install in /usr/lib/python2.6, but you shouldn't do it
that way, because locally compiled software should go in /usr/local,
while system packages from your distribution go in /usr
Best way forward I would think is to install ez_setup in your python2.6,
and then you will end up with a /usr/local/bin/easy_install. You can
then use this to easily install the mysql bindings, and whatever else
you will need aswell.
On Wed, 2009-11-04 at 01:01 -0800, joker wrote:
> i update python 2.5.2 to 2.6 and setup changed directory
> /usr/lib/python2.5 to /usr/local/lib/python2.5/
> and django doesnt working now
> Traceback (most recent call last):
> File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
> 1537, in HandlerDispatch
> File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
> 1229, in _process_target
> File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line
> 1128, in _execute_target
> File "/usr/local/lib/python2.5/site-packages/django/core/handlers/
> modpython.py", line 228, in handler
> return ModPythonHandler()(req)
> File "/usr/local/lib/python2.5/site-packages/django/core/handlers/
> modpython.py", line 191, in __call__
> self.load_middleware()
joker wrote: > i update python 2.5.2 to 2.6 and setup changed directory > /usr/lib/python2.5 to /usr/local/lib/python2.5/ > and django doesnt working now
> ImproperlyConfigured: Error importing middleware > django.contrib.flatpages.middleware: "No module named mysql.base"
You might want to do easy_install mysql-python or something equivalent for python 2.6
> joker wrote:
> > i update python 2.5.2 to 2.6 and setup changed directory
> > /usr/lib/python2.5 to /usr/local/lib/python2.5/
> > and django doesnt working now
> > ImproperlyConfigured: Error importing middleware
> > django.contrib.flatpages.middleware: "No module named mysql.base"
> You might want to do easy_install mysql-python or something equivalent
> for python 2.6