解决 Python No module named 'ConfigParser'

保留现场

ImportError: No module named 'ConfigParser'

Command "python setup.py egg_info" failed with error code 1 in

解决方法

在 Python 3.x 版本后,ConfigParser.py 已经更名为 configparser.py 所以出错!

可以切换 Python2 执行。

也可以尝试将文件重命名为ConfigParser.py

以下为参考,每个人安装路径可能不一样,可以全局搜索configparser.py

cp /usr/lib/python3.7/configparser.py /usr/lib/python3.7/ConfigParser.py