安装pip install mysqlclient
时,报错,如下图:
当时以为重点是 ERROR: Could not find a version that satisfies the requirement mysqlclient xxx
,搜遍互联网没找到解决方案。
然后看到有一句:OSError: mysql_config not found
,这说明是 mysql_config
的问题,于是我输入了一下 mysql_config
,如下图:
图没截全,给出解决方案了,输入:sudo apt install libmysqlclient-dev
,这时候再输入 mysql_config
现在回到开始,安装 pip install mysqlclient
齐活。