我是 Django 新手,在为运行此命令的应用程序安装 mysqlclient 时遇到了一些问题
pip install mysqlclient
我收到一个错误ModuleNotFoundError: No module named 'pip._internal.operations.build.wheel_legacy'
Traceback (most recent call last):
File "C:\Users\Ahmad\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Ahmad\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "E:\Python-projects\web_project\venv\Scripts\pip.exe\__main__.py", line 7, in <module>
File "e:\python-projects\web_project\venv\lib\site-packages\pip\_internal\cli\main.py", line 73, in main
command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
File "e:\python-projects\web_project\venv\lib\site-packages\pip\_internal\commands\__init__.py", line 104, in create_command
module = importlib.import_module(module_path)
File "C:\Users\Ahmad\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "e:\python-projects\web_project\venv\lib\site-packages\pip\_internal\commands\install.py", line 37, in <module>
from pip._internal.wheel_builder import build, should_build_for_install_command
File "e:\python-projects\web_project\venv\lib\site-packages\pip\_internal\wheel_builder.py", line 11, in <module>
from pip._internal.operations.build.wheel_legacy import build_wheel_legacy
ModuleNotFoundError: No module named 'pip._internal.operations.build.wheel_legacy'
我有Python 3.8.3和pip 20.2.3
这个错误的原因是什么,我该如何解决?