I have a MacBook Air with macOs Sonoma 14.0 and when I write in the terminal
$ pip3 install flask-mysqldb
I get the error:
How can I fix this?
I have a MacBook Air with macOs Sonoma 14.0 and when I write in the terminal
$ pip3 install flask-mysqldb
I get the error:
How can I fix this?
You're using a very new version Python (3.12, released just this month) that mysqlclient
(a dependency of the distribution you're trying to install) does not yet provide pre-built wheels for.
Because of this, pip
is trying to build mysqlclient
from source. This is fails because you're missing some required system dependencies.
You can consult mysqlclient
's documentation for its exact build dependencies. At a minimum, you'll need to install pkg-config
based on that error message.
Alternatively, you can switch to a version of Python that msqlclient
supports and provides wheels for. Currently, that's Python 3.8 - 3.11 for mysqlclient
v2.2.0.