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

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

macOS pip install mysqlclient /bin/sh: mysql_config: command not found_第1张图片

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

解决方法:

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

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

下图为具体操作步骤:

macOS pip install mysqlclient /bin/sh: mysql_config: command not found_第2张图片

macOS pip install mysqlclient /bin/sh: mysql_config: command not found_第3张图片

macOS pip install mysqlclient /bin/sh: mysql_config: command not found_第4张图片

你可能感兴趣的:(python,mac,python,myclient,macOS)