On Sun, Oct 22, 2023 at 5:08 PM Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Odhiambo Washington writes:
After successfully updating my MM3 venv install, I thought I could also keep everything else up to date. One app refuses - mysqlclient. All the rest did update.
Is this a report for our benefit, or are you asking for help? I guess I can just assume the latter, I already figured out what I can say.
Was asking for help :)
(venv) [mailman@gw /opt/mailman/mm]$ pip install -U mysqlclient
Requirement already satisfied: mysqlclient in ./venv/lib/python3.11/site-packages (2.1.1)
"Requirement already satisfied" means that you can keep using the existing Python 3 mysqlclient wrapper. There's no need to upgrade immediately.
When it comes to Python stuff, some of us miss a lot.
Exception: Can not find valid pkg-config name.
> Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars
manually [end of output]
That seems clear enough to me. I don't know much about the MySQL family, so correct me if I'm wrong. As I read the trace, there are two or maybe three MySQL versions that might provide the upstream mysqlclient, and each is expected to provide a pkg-config module which generates a C compiler environment to build code that links to the mysqlclient library. For some reason, your installation of MySQL or MariaDB doesn't provide that pkg-config module, or doesn't provide it in the usual place.
If your distro provided MySQL and separates development information into a separate mysql-dev package, maybe you just need to install that.
I will try to figure out why this did not work automatically. Maybe there is something I did not fix when I changed from MySQL to MariaDB a few moons ago. The response by @Wikinaut <mail@tgries.de> did help though and now my venv is fully updated:
(venv) [mailman@gw /opt/mailman/mm]$ MYSQLCLIENT_CFLAGS="-I/usr/local/include/mysql" MYSQLCLIENT_LDFLAGS="-L/usr/local/lib/mysql -lmysqlclient" pip3 install -U mysqlclient Requirement already satisfied: mysqlclient in ./venv/lib/python3.11/site-packages (2.1.1) Collecting mysqlclient Using cached mysqlclient-2.2.0.tar.gz (89 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: mysqlclient Building wheel for mysqlclient (pyproject.toml) ... done Created wheel for mysqlclient: filename=mysqlclient-2.2.0-cp311-cp311-freebsd_13_2_release_p4_amd64.whl size=78552 sha256=33cc2656b710740ba05b9eaa553b7971a38c44e4f26f572fbbd4d4e5c0bbcc02 Stored in directory: /usr/home/mailman/.cache/pip/wheels/a4/97/41/1e55ebbb29ce69d9008782f457658f48755b861fa145538ca0 Successfully built mysqlclient Installing collected packages: mysqlclient Attempting uninstall: mysqlclient Found existing installation: mysqlclient 2.1.1 Uninstalling mysqlclient-2.1.1: Successfully uninstalled mysqlclient-2.1.1 Successfully installed mysqlclient-2.2.0
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]