ImportError: No module named 'ConfigParser' in Python
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.
-
V2
Vien Pham Dec 25 2021
I try to run command
sudo python3 -m pip install mysql-connector
And it worked for me.
-
N1
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.
-
m0
mino Dec 25 2021
Oh,
MySQL-python
does 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.