0

I'm new to Django and I'm facing some issues installing mysqlclient for my application running this command

pip install mysqlclient

I'm getting an error 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'

I have Python 3.8.3 and pip 20.2.3

what is the cause of this error and how can I solve it?

2
  • 2
    If you switch to 64-bit Python on Windows, then pip install mysqlclient will be able to install the official wheel. Commented Sep 21, 2020 at 14:11
  • thank you, I switched to 64-bit Python and it worked like charm Commented Sep 23, 2020 at 19:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.