あるmysqlclient 1.3.13以降が必要です。あなたは0.9.3を持っています。

python manage.py startappのて、myApp
:トレースバック(最新の呼び出しの最後)
<モジュール>内のファイル"manage.py"、21行、
メイン()
メインのFile "manage.py"、17行目、
execute_from_command_line(sys.argvの)
ファイル"E:\ Python37 \ libに\のsite-packages \ジャンゴ\コア\管理\ __ init__.py"、execute_from_command_lineの中線401、
utility.execute()
ファイル「E:\ Python37 \ libに\のsite-packages \ジャンゴ\コア\ 「実行中に、ライン377、管理\ __ init__.py
)(django.setup
Eファイルを":\ Python37 \ libに\のsite-packages \ジャンゴ\ __ init__.py"、セットアップでライン24、
apps.populate(settings.INSTALLED_APPS)
ファイル"E:\ Python37 \ libに\のsite-packages \ジャンゴ\ APPS \ registry.py"、移入の行114、
app_config。import_models()
ファイル"E:\ Python37 \ libに\のsite-packages \ジャンゴ\ APPS \ config.py"、行211、import_modelsで
self.models_module = import_module(models_module_name)
ファイル"E:\ Python37 \ libに\のimportlib \ __ init__.py" 、import_moduleにライン127、
戻り_bootstrap._gcd_import(名[レベル:]、パッケージレベル)
ファイル"<凍結importlib._bootstrap>"、ライン1006 _gcd_import中
にファイル"<凍結importlib._bootstrap>"、ライン983、 _find_and_loadの
_find_and_load_unlockedでファイル"<フローズンimportlib._bootstrap>"、行967、
_load_unlockedでファイル"<フローズンimportlib._bootstrap>"、行677、
ファイル"<フローズンimportlib._bootstrap_external>" exec_moduleでは、ライン728、
ファイル「<フローズンimportlib。_call_with_frames_removedで_bootstrap>」、行219、
ファイル"E:\ Python37 \ libに\のsite-packages \ジャンゴ\のcontrib \認証\ models.py"、2行目、<モジュール>で
django.contrib.auth.base_userインポートAbstractBaseUser、BaseUserManagerのから
ファイル「E:\ Python37 \ "<モジュール>で、ライン47、LIB \のsite-packages \ジャンゴ\のcontrib \認証\ base_user.py
クラスAbstractBaseUser(models.Model):
ファイル" E:\ Python37 \ libに\のsite-packages \ジャンゴ\ DB \モデル\「__new__では、ライン121、base.py
new_class.add_to_class( '_メタ'、オプション(メタ、app_label))
ファイル"E:\ Python37 \ libに\のsite-packages \ジャンゴ\ DB \モデル\ base.py"、 add_to_classの中にライン325、
value.contribute_to_class(CLS、名)
ファイル"E:\ Python37 \ libに\のsite-packages \ジャンゴ\ DB \モデル\ options.py" contribute_to_classでは、ライン208、
self.db_table = truncate_name(self.db_table、connection.ops.max_name_length())
ファイル"E:\ Python37 \ libに\のsite-packages \ジャンゴ\ DB \ __ init__.py"、28行、__getattr__における
リターンのgetattr(接続の[ DEFAULT_DB_ALIAS]、アイテム)
ファイル"E:\ Python37 \ libに\のsite-packages \ジャンゴ\ DB \ utils.py"、行207、__getitem__で
バックエンド= load_backend(デシベル[ 'ENGINE'])
ファイル「E:\ Python37 \ LIB \のsite-packages \ジャンゴ\ DB \ utils.py」、load_backendの中線111、
リターンimport_module( '%s.base' %backend_name)
ファイル"E:\ Python37 \ libに\のimportlib \ __ init__.py"、行127 、import_moduleで
リターン_bootstrap._gcd_import(名[レベル:]、パッケージ、レベル)
ファイル"E:\ Python37 \ libに\のsite-packages \ジャンゴ\ DB \バックエンド\ mysqlの\ base.py"、37行、で<モジュール>
昇給ImproperlyConfigured( 'はmysqlclient 1.3.13以降が必要です。あなたは%sのを持っている' %データベース.__ version__)は
django.core.exceptions.ImproperlyConfigured:あるmysqlclient 1.3.13以降が必要です。あなたは0.9.3を持っています。

ソリューション:__ init__.pyファイル

1  インポートpymysql
 2 pymysql.version_info =(1、4、6、' 最終'、0)  変化はmysqlclientバージョン
3 pymysql.install_as_MySQLdb()

 

 

参考ブログ(他のソリューションではなく、プロのテストがあるうち):https://www.cnblogs.com/allen2333/p/11754161.html

おすすめ

転載: www.cnblogs.com/zxkwdw/p/12393152.html