Python 2.7和3.4在我的mac-os中共存。安装官方mysql连接器(从dev.mysql.com下载)后,import mysql.connector只能传入Python2.7。有没有办法让连接器在两个python版本上都能工作?
发布于 2015-01-20 15:15:42
您可以通过简单安装或pypi中的pip安装相同的连接器。
easy_install-3.4 mysql-connector-python发布于 2017-11-25 21:06:10
相对于Python 3.6:
官方的mysql连接器只有在我把它安装在OSX上之后才能在python2.7中工作。作为替代方案,我使用了集成在python 3.6中的easy_install-3.6 python模块
转到目录: /Library/Frameworks/Python.framework/Versions/3.6/bin
命令:easy_install-3.6MySQL-connector-python
https://stackoverflow.com/questions/28039131
复制相似问题