Trying to learn Django on windows is getting quite discouraging because every time I try to take another step there are errors.
This is my setup; Windows 7 Python 2.7 Installed mySQL-python 1.2.3 Installed virtualenv
I've created a mysite directory on my drive. In the command prompt I changed into that directory, and created a virtualenv (without any extra commands) called "mysite_env". I activated the environment and used the command "pip install django". I used the django-admin.py to start a new project called mysite. So now my folder "mysite" contains "mysite" and "mysite_env" directories.
This is what happens when I try to use the django runserver utility.
(mysite_env) c:\mysite\mysite>python manage.py runserver
Validating models...
Unhandled exception in thread started by <bound method Command.inner_run of <dja
ngo.contrib.staticfiles.management.commands.runserver.Command object at 0x000000
0003073908>>
Traceback (most recent call last):
File "c:\mysite\mysite_env\lib\site-packages\django\core\management\commands\r
unserver.py", line 88, in inner_run
self.validate(display_num_errors=True)
File "c:\mysite\mysite_env\lib\site-packages\django\core\management\base.py",
line 249, in validate
num_errors = get_validation_errors(s, app)
File "c:\mysite\mysite_env\lib\site-packages\django\core\management\validation
.py", line 28, in get_validation_errors
from django.db import models, connection
File "c:\mysite\mysite_env\lib\site-packages\django\db\__init__.py", line 78,
in <module>
connection = connections[DEFAULT_DB_ALIAS]
File "c:\mysite\mysite_env\lib\site-packages\django\db\utils.py", line 93, in
__getitem__
backend = load_backend(db['ENGINE'])
File "c:\mysite\mysite_env\lib\site-packages\django\db\utils.py", line 33, in
load_backend
return import_module('.base', backend_name)
File "c:\mysite\mysite_env\lib\site-packages\django\utils\importlib.py", line
35, in import_module
__import__(name)
File "c:\mysite\mysite_env\lib\site-packages\django\db\backends\mysql\base.py"
, line 14, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No mo
dule named MySQLdb
I have searched stackoverflow and the internet and cannot find anything that works. I wish I could get into some actual coding instead of just getting caught up in all this stuff. Seems like macs are way better for coding in python+django