Ubuntu Installation Mysql-connector-python

Source: Internet
Author: User

Error encountered while installing Mysql-python:

sudo pip install Mysql-python

Traceback (most recent):
File "<string>", line 1, in <module>
File "/tmp/pip-install-1n6s3hil/mysql-python/setup.py", line A, in <module>
From Setup_posix import Get_config
File "/tmp/pip-install-1n6s3hil/mysql-python/setup_posix.py", line 2, <module>
From Configparser import Safeconfigparser
Modulenotfounderror:no module named ' Configparser '

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in/tmp/pip-install-1n6s3hil/mysql-python/

According to the online method, the/usr/local/python3/lib/python3.6 path under the configparser.py renamed toConfigParser.py,但是仍然不奏效,因此装其他的连接包

Mysql-connector-python is MySQL's official python connection MySQL database driver, which we install directly with the following command:

sudo pip install Mysql-connector-python
Import Mysql.connector as MCMC. __version__ ' 8.0.11 '

Indicates successful installation

Ubuntu Installation Mysql-connector-python

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.