MySQL连接器不工作:没有名为Connector的模块

时间:2017-12-01 07:55:26

标签: python mysql ubuntu sublimetext3 mysql-connector

操作系统:Ubuntu 17.10 Python:2.7

SUBLIME TEXT 3:

我正在尝试导入mysql.connector

ImportError:没有名为connector的模块

虽然,当我尝试在python shell中导入mysql.connector时,它可以工作。

之前它工作正常,我刚刚升级了Ubuntu,不知怎的 mysql连接器无效。

我尝试使用pip和git重新安装 mysql连接器。

仍然没有运气。

请帮忙!

2 个答案:

答案 0 :(得分:1)

我目前没有看到Ubuntu 17.10的连接器版本。 enter image description here

您是否尝试过替代连接?

希望它会有所帮助:     的 http://mysql-python.sourceforge.net/MySQLdb.html

答案 1 :(得分:-1)

我现在正在使用Python 3.6,mysql.connector最适合我。

操作系统:Ubuntu 18.04