下图是本人跑python项目需要安装mysqlclient出的报错

macOS pip install mysqlclient /bin/sh: mysql_config: command not found

网上搜了一片啥安装这那的。。。啥啥的,都没解决。

解决方法:

找到已经安装的包 左上角  PyCharm=>Preferences=>Project:XXX=>Project Interpreter,然后下面加号搜索mysqlclient,点击右侧

https://github.com/PyMySQL/mysqlclient-python 链接,里面讲解的很清楚,安装步骤更详细

下图为具体操作步骤:

macOS pip install mysqlclient /bin/sh: mysql_config: command not found

macOS pip install mysqlclient /bin/sh: mysql_config: command not found

macOS pip install mysqlclient /bin/sh: mysql_config: command not found

相关文章: