Cannot run Pipenv install mysqlclient

I am unable to run pipenv install mysqlclient

Please someone help me fix this, as I can’t progress in the course without a solution.

Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing mysqlclient...
Resolving mysqlclient...
Adding mysqlclient to Pipfile's [packages] ...
✔ Installation Succeeded
Pipfile.lock (5fd2b0) out of date, updating to (39653e)...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
Resolving dependencies...
✘ Locking Failed!
⠇ Locking...
ERROR:pip.subprocessor:[present-rich] Getting requirements to build wheel exited with 1
[ResolutionFailure]:   File "/Users/jackwalker/.local/share/virtualenvs/storefront-DSejRpzC/lib/python3.11/site-packages/pipenv/resolver.py", line 704, in _main
[ResolutionFailure]:       resolve_packages(
[ResolutionFailure]:   File "/Users/jackwalker/.local/share/virtualenvs/storefront-DSejRpzC/lib/python3.11/site-packages/pipenv/resolver.py", line 662, in resolve_packages
[ResolutionFailure]:       results, resolver = resolve(
[ResolutionFailure]:       ^^^^^^^^
[ResolutionFailure]:   File "/Users/jackwalker/.local/share/virtualenvs/storefront-DSejRpzC/lib/python3.11/site-packages/pipenv/resolver.py", line 642, in resolve
[ResolutionFailure]:       return resolve_deps(
[ResolutionFailure]:       ^^^^^^^^^^^^^
[ResolutionFailure]:   File "/Users/jackwalker/.local/share/virtualenvs/storefront-DSejRpzC/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 1167, in resolve_deps
[ResolutionFailure]:       results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
[ResolutionFailure]:       ^^^^^^^^^^^^^^^^^^^^^^
[ResolutionFailure]:   File "/Users/jackwalker/.local/share/virtualenvs/storefront-DSejRpzC/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 948, in actually_resolve_deps
[ResolutionFailure]:       resolver.resolve()
[ResolutionFailure]:   File "/Users/jackwalker/.local/share/virtualenvs/storefront-DSejRpzC/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 690, in resolve
[ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  You can use $ pipenv run pip install <requirement_name> to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Getting requirements to build wheel exited with 1
1 Like

I see you made a post as well😂

brew install mysql pkg-config
pip install mysqlclient

Worked like a charm