On Sat, Sep 18, 2010 at 2:08 AM, Jagdeep Singh Malhi
<singh.malh...@gmail.com> wrote:
> I am using virtualenv 1.5 to install multiple version of django in
> same PC.
> My Django is works fine with virtualenv, follow this link
> http://pypi.python.org/pypi/virtualenv#downloads
> but me face problem with MySQLdb when i configure the database in
> setting.py file.
>
> Error is :
>  ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
> django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
> module: No module named MySQLdb
>
>
> but  MySQLdb is already installed in my PC and work fine without using
> virtualenv.

Have you created the virtual environment by using the --no-site-packages
command line switch to virtualenv? If so, no globally installed module/packages
(among them MySQLdb) will be inherited by the environment.

>
> My django  mod_wsgi file is :-

If you are starting, I'd suggest to not mix two somewhat complex
tools like virtualenv and wsgi, specially if you are experiencing problems
with one of them.

Either

fix your MySQLdb+virtualenv problem without using
WSGI, use the manage.py runserver development HTTP server)
first and then move to WSGI.

Or

Don't skip the reading the great mod_wsgi docs step, particularly
the topic about how to combine it with virtualenv:

http://code.google.com/p/modwsgi/wiki/VirtualEnvironments

-- 
Ramiro Morales  |  http://rmorales.net

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to