Python install MySQL-python ImportError: No module named 'ConfigParser'
original shenghuiping2001 finally released on 2019-04-20 10:12:34 reading number 131 Collection
Expand
System: redhat
Python : Python 3.7
Install MySQL-python, the result of an error:
ImportError: No module named 'ConfigParser'
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ry1be27_/mysql-python/
the reason:
After Python 3.x version, ConfigParser.py has been renamed configparser.py so wrong!
The system can take a look at the python command, the system comes with a python 2.6.
[root@centos]# ls /usr/bin/python*
/usr/bin/python /usr/bin/python2 /usr/bin/python2.6
[root@centos]#
[root@centos]# python2.6 -V
Python 2.6.6
[root@centos]#
Solution:
Locate the file configparser, changed its name to the old version of the name ConfigParser
/usr/local/Python34/lib/python3.4/configparser.py /usr/local/Python34/lib/python3.4/ConfigParser.py cp
----------------- ----
author: DBA Schrodinger
source: CSDN
original: https: //blog.csdn.net/kk185800961/article/details/53296822
copyright: This article is a blogger original article, reproduced, please attach Bowen link!
----------------
Disclaimer: This article is CSDN blogger original article "shenghuiping2001", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement. .
Original link: https: //blog.csdn.net/shenghuiping2001/article/details/89413519