我正在努力
pip install mysqlclient
在Ubuntu 22.04上,但是
Collecting mysqlclient
Using cached mysqlclient-2.2.0.tar.gz (89 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
à Getting requirements to build wheel did not run successfully.
â exit code: 1
â°â> [24 lines of output]
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
Trying pkg-config --exists mysqlclient
Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127.
Trying pkg-config --exists mariadb
根据上的评论
this question
我做到了
apt-get -y install python3-dev gcc build-essential libmysqlclient-dev
注意
ls /usr/include/mysql/
和
ls /usr/lib/x86_64-linux-gnu/libmysqlclient.*
显示libmysqlclient已经安装,mysql头已经就位。
还缺少什么?