ImportError: No module named 'ConfigParser' in Python
Dung Do Tien Dec 25 2021 544
Hello Guys, I'm just studying Python one month before and I practiced with the MySql database to store data for me.
When I try to run command
pip install MySQL-python on CentOs Ubuntu but I got an exception ImportError: No module named 'ConfigParser'.
File "/var/folders/lf/asdaklfhnasndasbdhsabd_3e4332w/T/pip-build/MySQL-python/setup.py", line 14, in <module> from setup_posix import get_config File "./setup_posix.py", line 2, in <module> from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser'
I'm using Python 3.9 and running on CentOs.
Do you have any suggestions for me?
Thank you so much.
Have 3 answer(s) found.
Vien Pham Dec 25 2021
I try to run command
sudo python3 -m pip install mysql-connector
And it worked for me.
Nguyen Quoc Viet Dec 25 2021
yum install python39-devel.x86_64
yum groupinstall -y 'development tools'
pip3 install mysql-connector
pip install mysqlclient
You can run step by step above and try again. I hope it helpful for you.
mino Dec 25 2021
MySQL-pythondoes not currently support Python 3.
You can try install MySql by using command
pip install mysqlclient.
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.