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?
Copyright © 2021 Jogjafile Inc.
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,
pipis trying to buildmysqlclientfrom 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 installpkg-configbased on that error message.Alternatively, you can switch to a version of Python that
msqlclientsupports and provides wheels for. Currently, that's Python 3.8 - 3.11 formysqlclientv2.2.0.