mysql-python的安装问题

mysql-python的安装问题,python,django,mysql-python,Python,Django,Mysql Python,我正在尝试运行一个python django项目,作为python 2.7、django 1.8和mysql 5.7的必需版本,所以 安装1.2.5版本的MySQL python,构建轮子,使其断裂,并得到以下错误 Building wheel for MySQL-python (setup.py) ... error ERROR: Command errored out with exit status 1: error: command 'cc' failed with exit st

我正在尝试运行一个python django项目,作为python 2.7、django 1.8和mysql 5.7的必需版本,所以 安装1.2.5版本的MySQL python,构建轮子,使其断裂,并得到以下错误

Building wheel for MySQL-python (setup.py) ... error
  ERROR: Command errored out with exit status 1:

error: command 'cc' failed with exit status 1
我链接mysql@5.7,所以当我检查哪个mysql\u配置时,我得到的是/usr/local/opt/mysql@5.7/bin/mysql\u配置。

我已经尝试了大多数解决方案,我已经通过brew安装了mysql

在安装django之前,我曾尝试在virutal env中安装mysqlclient,但当我尝试在venv中安装mysqlclient时 我也犯了同样的错误

Building wheel for mysqlclient (setup.py) ... error
  ERROR: Command errored out with exit status 1:
error: command 'cc' failed with exit status 1
我不知道问题出在哪里,我对python还是新手


任何帮助都将不胜感激。

这可能会有所帮助::)感谢您的快速响应,但没有成功,我可以在虚拟环境外部安装mysqlclient,但在虚拟环境内部安装mysqlclient遇到相同的错误尝试安装MySQL python==1.2.5也没有成功相同的错误您可以删除虚拟环境并创建一个新的吗,然后再试一次(如果可能的话)我没有得到错误,但是当我运行应用程序时,它抛出下面的错误raise INPROPERLYCONFIGURED(“加载MySQLdb模块时出错:%s”%e)django.core.exceptions.INPROPERLYCONFIGURED:加载MySQLdb模块时出错:这是MySQLdb版本(1,2,5,'final',1),但mysql是版本(1,4,4,'final',0)当我查看brew列表时,有这么多东西,是因为mysql客户端mysql-connector-c吗mysql@5.7opensslopenssl@1.1