如何为python 3.5.1安装mysql连接器?
我使用的是python 3.5.1,在安装mysql连接器时遇到问题:如何为python 3.5.1安装mysql连接器?,python,mysql,pip,version,connector,Python,Mysql,Pip,Version,Connector,我使用的是python 3.5.1,在安装mysql连接器时遇到问题: install --allow-external mysql-connector-python-rf mysql-connector-python-rf 不起作用,mysql连接器python rf的正常pip命令也不起作用。我得到以下信息: error: option --single-version-externally-managed not recognized 有什么想法吗?到目前为止,对于python 3.5
install --allow-external mysql-connector-python-rf mysql-connector-python-rf
不起作用,mysql连接器python rf的正常pip命令也不起作用。我得到以下信息:
error: option --single-version-externally-managed not recognized
有什么想法吗?到目前为止,对于
python 3.5.1
还没有mysql连接器,但是您可以使用pymysql将mysql连接到python 3.5.1
import pymysql
conn = pymysql.connect(host='localhost', port=port_no, user='db_user', passwd='password', db='db_name')
也许,这可以解决这个问题:我在那篇文章中使用了--egg解决方案,它成功了,谢谢。