105
I was facing the similar issue. My env details – Python 2.7.11 pip 9.0.1 CentOS release 5.11 (Final)
Error on python interpreter –
>>> import mysql.connector
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mysql.connector
>>>
Use pip to search the available module –
$ pip search mysql-connector | grep --color mysql-connector-python
mysql-connector-python-rf (2.2.2) - MySQL driver written in Python
mysql-connector-python (2.0.4) - MySQL driver written in Python
Install the mysql-connector-python-rf –
$ pip install mysql-connector-python-rf
Verify
$ python
Python 2.7.11 (default, Apr 26 2016, 13:18:56)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mysql.connector
>>>
Thanks =)
For python3 and later use the next command: $ pip3 install mysql-connector-python-rf
未经允许不得转载:萌萌guo angline - Apprentissage » solved python version problem with no module mysql and mysql.connector


使用python批量爬取主流搜索引擎图片
python爬虫关键词爬取百度的图片
python库taichi太极人工智能tensoflow图形处理
Selenium with Tor Browser using Python
shell.cloud.google保持在线
run crontab with python selenium tor browser display in linux
linux环境使用python调用tor浏览器随机浏览器网页
Python实现刷youtube、B站、爱奇艺、西瓜视频等视频网站播放量(Python教学文章)
