Pipenv install mysqlclient issues

I’ve gone through cleaning my pipenv, upgrading pip3, and making a new pipenv environment. If someone can help me end this issue for me so I can get through the Django course, that would be great :slight_smile:

storefront % pipenv install mysqlclient
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] …
:heavy_check_mark: 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 “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pipenv/resolver.py”, line 704, in _main
[ResolutionFailure]: resolve_packages(
[ResolutionFailure]: File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pipenv/resolver.py”, line 662, in resolve_packages
[ResolutionFailure]: results, resolver = resolve(
[ResolutionFailure]: ^^^^^^^^
[ResolutionFailure]: File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pipenv/resolver.py”, line 642, in resolve
[ResolutionFailure]: return resolve_deps(
[ResolutionFailure]: ^^^^^^^^^^^^^
[ResolutionFailure]: File “/Library/Frameworks/Python.framework/Versions/3.11/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 “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pipenv/utils/resolver.py”, line 948, in actually_resolve_deps
[ResolutionFailure]: resolver.resolve()
[ResolutionFailure]: File “/Library/Frameworks/Python.framework/Versions/3.11/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

Hey dude,

We are having the same issue, and I am unable to find any form of solution anywhere. If you have found one please let me know. If I find one I’ll post it here too, but I’m getting really annoyed at the lack of help with it.

1 Like

Okay so after a lot of looking, I ended up on the pypi website. I installed HomeBrew using:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then once HomeBrew was installed I followed the mysqlclient installation instructions on the pypi website:

brew install mysql pkg-config

pip install mysqlclient

This seems to have worked. If for any reason I still have errors, I’ll come back to inform, but I say give it a go.

1 Like

This is what I did to solve it as well! Got Brew, then installed the missing packages with this command. Worked like a charm :pinched_fingers:

For those on linux battling with the same problem: