使用Django在执行python manage.py startapp myApp创建应用

使用Django在执行python manage.py startapp myApp创建应用

出现很长的报错信息并且最后两行提示:
raise ImproperlyConfigured(‘mysqlclient 1.3.13 or newer is required; you have %s.’ % Database.version)
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.

解决方法:找到Python安装路径下的Python36-32\Lib\site-packages\django\db\backends\mysql\base.py文件
将文件中的如下代码注释

if version < (1, 3, 3):
raise ImproperlyConfigured(“mysqlclient 1.3.3 or newer is required; you have %s” % Database.version)

最后重新执行python manage.py startapp myApp即可创建myApp目录

你可能感兴趣的:(Django)