python 3を解決する.8 mysqlclientのインストールに失敗した問題


PIPのオンラインインストールに失敗しました
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?

(venv) D:\djangoall\education\edu>pip install wheel
Collecting wheel
  Using cached https://files.pythonhosted.org/packages/8c/23/848298cccf8e40f5bbb59009b32848a4c38f4e7f3364297ab3c3e2e2cd14/wheel-0.34.2-py2.py3-none-any.whl
Installing collected packages: wheel
Successfully installed wheel-0.34.2

(venv) D:\djangoall\education\edu>pip install mysqlclient-1.4.6-cp38-cp38-win_amd64.whl
mysqlclient-1.4.6-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.


https://www.lfd.uci.edu/~gohlke/pythonlibs/#entropy対応バージョンのwhlファイルをダウンロードし、ローカルインストールに失敗したらどうしますか?python環境に入る
>>> import pip._internal;
>>> print(pip._internal.pep425tags.get_supported())
[('cp38', 'cp38m', 'win_amd64'), ('cp38', 'none', 'win_amd64'), ('py3', 'none', 'win_amd64'), ('cp38', 'none', 'any'), ('cp3', 'none', 'any'), ('py38', 'none', 'any'), ('py3', 'none', 'any'), ('py37', 'none', 'any'), ('py36', 'none', 'any'), ('py35', 'none', 'any
'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]
>>>


問題はcp 38 mで、ダウンロードしたwhlファイルはcp 38で、断固としてcp 38 mを変更します
(venv) D:\djangoall\education\edu>pip install mysqlclient-1.4.6-cp38-cp38m-win_amd64.whl
Processing d:\djangoall\education\edu\mysqlclient-1.4.6-cp38-cp38m-win_amd64.whl
Installing collected packages: mysqlclient
Successfully installed mysqlclient-1.4.6


インストールに成功しました.もしこの心得があなたにこの問題を解決してくれたら、いいですね~:)一緒に勉強しましょう.