PLEASE HELP ME! update python 2.5 to 2.6 and django doesnt work

3 views
Skip to first unread message

joker

unread,
Nov 4, 2009, 4:01:12 AM11/4/09
to Django users
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()

File "/usr/local/lib/python2.5/site-packages/django/core/handlers/
base.py", line 42, in load_middleware
raise exceptions.ImproperlyConfigured, 'Error importing middleware
%s: "%s"' % (mw_module, e)

ImproperlyConfigured: Error importing middleware
django.contrib.flatpages.middleware: "No module named mysql.base"

Crispin Wellington

unread,
Nov 4, 2009, 4:16:16 AM11/4/09
to django...@googlegroups.com
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.

Kind Regards

Crispin Wellington

Roland van Laar

unread,
Nov 4, 2009, 4:17:51 AM11/4/09
to django...@googlegroups.com
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

Regards,

Roland van Laar

joker

unread,
Nov 4, 2009, 5:46:07 AM11/4/09
to Django users
i worked easy_install mysql-python command but still doesnt work

sste...@gmail.com

unread,
Nov 4, 2009, 2:26:30 PM11/4/09
to django...@googlegroups.com

On Nov 4, 2009, at 4:01 AM, 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/

That doesn't look right. If you installed 2.6, the new directories
should have 2.6 in them, not 2.5 and so should your tracebacks.

S
Reply all
Reply to author
Forward
0 new messages