python - MySQL 连接器不工作 : NO module named Connector

标签 python mysql ubuntu sublimetext3 mysql-connector

操作系统:Ubuntu 17.10 Python:2.7

崇高文本3:

我正在尝试导入 mysql.connector

导入错误:没有名为连接器的模块

尽管如此,当我尝试在 python shell 中导入 mysql.connector 时,它起作用了。

之前它工作正常,我刚刚升级了 Ubuntu,但不知何故 mysql 连接器 无法工作。

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

还是没有运气。

请帮忙!

最佳答案

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

您是否尝试过其他连接?

希望能有所帮助: <强> http://mysql-python.sourceforge.net/MySQLdb.html

关于python - MySQL 连接器不工作 : NO module named Connector,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47588910/

相关文章:

ubuntu - 在 native 模式下运行 erlang 代码

python - 使用python从mysql检索数据时如何删除多余的逗号

php - 使用复选框值进行sql查询

python - 这个 Python 语句是什么意思?

python - 在 Python/Django 中将用户的 facebook/twitter 好友与网站用户进行比较

mysql - 将枚举值从 1 更新为 0 mysql?

c++ - 为什么我的程序在 windows 上读取文件比在 Ubuntu 上需要更长的时间

ubuntu - 为什么我的 Neo4j 图像的多个容器与 Docker 共享数据?

Python,打印列表没有给我想要的输出

python - 将长列表全部写入一行