Python 安装 Mysql模块 报错

Mac上使用命令:pip3 install mysql-connector-python-rf安装MySql模块时,

报错:
error: option –single-version-externally-managed not recognized

原因可能是我下载的安装包是wheel格式的安装包,如果电脑上没有安装wheel的话就会报这个错误。

我自己是这么解决的:

首先安装wheel:pip install wheel

然后再用pip安装我想要包:pip3 install mysql-connector-python-rf