【发布时间】:2013-02-24 14:33:36
【问题描述】:
我安装了 python 2.6 和 MySQL-python-1.2.2.win32-py2.6 并使用命令 django-admin.py startproject mysite 创建了一个新项目,它成功创建了项目,我可以运行它。但是当我编辑mysite/settings.py 文件使用 MySQLdb 并再次运行它,它说
Validating models...
Unhandled exception in thread started by bound method Command.inner_run of dja
ngo.contrib.staticfiles.management.commands.runserver.Command object at 0x02BFCB
raise ImproperlyConfigured(Error loading MySQLdb module:)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: DLL l
oad failed: The specified module could not be found.
我尝试搜索所有网络并无法确定问题。是与设置一些环境变量有关吗?谁能帮我解决这个问题?
【问题讨论】:
-
你忘记了那里的东西..
-
对不起!!现在添加它。谢谢!
标签: python django mysql-python