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