开发者社区> 问答> 正文

新手求教,请麻烦看看这个报错?报错

报错情况,我按照https://docs.djangoproject.com/en/dev/intro/tutorial01/此教程创建我的第一个django

进行到这一步的时候报错,请问是什么意思?

Traceback (most recent call last):

  File "D:\Program Files (x86)\JetBrains\PyCharm 3.0.1\helpers\pycharm\django_manage.py", line 23, in <module>
    run_module(manage_file, None, '__main__', True)
  File "D:\Python27\lib\runpy.py", line 176, in run_module
    fname, loader, pkg_name)
  File "D:\Python27\lib\runpy.py", line 82, in _run_module_code
    mod_name, mod_fname, mod_loader, pkg_name)
  File "D:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "D:\DjangoSpace\mysite\manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "D:\Python27\lib\site-packages\django\core\management\__init__.py", line 453, in execute_from_command_line
    utility.execute()
  File "D:\Python27\lib\site-packages\django\core\management\__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "D:\Python27\lib\site-packages\django\core\management\__init__.py", line 272, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "D:\Python27\lib\site-packages\django\core\management\__init__.py", line 77, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "D:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in import_module
    __import__(name)
  File "D:\Python27\lib\site-packages\django\core\management\commands\sql.py", line 6, in <module>
    from django.core.management.sql import sql_create
  File "D:\Python27\lib\site-packages\django\core\management\sql.py", line 9, in <module>
    from django.db import models
  File "D:\Python27\lib\site-packages\django\db\__init__.py", line 40, in <module>
    backend = load_backend(connection.settings_dict['ENGINE'])
  File "D:\Python27\lib\site-packages\django\db\__init__.py", line 34, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "D:\Python27\lib\site-packages\django\db\utils.py", line 93, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "D:\Python27\lib\site-packages\django\db\utils.py", line 27, in load_backend
    return import_module('.base', backend_name)
  File "D:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in import_module
    __import__(name)
  File "D:\Python27\lib\site-packages\django\db\backends\mysql\base.py", line 17, in <module>
    raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb


Process finished with exit code 1

展开
收起
爱吃鱼的程序员 2020-06-22 14:37:52 436 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    应该是没有安装mysqldb这个模块吧<spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">loadingMySQLdbmodule:NomodulenamedMySQLdb <spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">MySQLdb没找到谢谢各位,可能是IDE没安装成功这个,我是在IDE里安装的

    2020-06-22 14:38:10
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载