ModuleNotFoundError: No module named 'ConfigParser'

Setting up python-apt (0.9.3.5ubuntu3) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in
    from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
dpkg: error processing package python-apt (--configure):
 subprocess installed post-installation script returned error exit status 1

Soluton (解决方法) :

sudo -H pip install ConfigParser -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
Looking in indexes: http://mirrors.aliyun.com/pypi/simple
Collecting ConfigParser

 


  Downloading http://mirrors.aliyun.com/pypi/packages/ba/05/6c96328e92e625fc31445d24d75a2c92ef9ba34fc5b037fe69693c362a0d/configparser-3.7.4-py2.py3-none-any.whl
Installing collected packages: ConfigParser
Successfully installed ConfigParser-3.7.4
 

Result  (结果):

find /usr/lib -name configparser.py
/usr/lib/python3.4/configparser.py
/usr/lib/python3.6/configparser.py
find /usr/lib -name ConfigParser.py
/usr/lib/python2.7/ConfigParser.py
sudo -H pip install configparser -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
Looking in indexes: http://mirrors.aliyun.com/pypi/simple
Requirement already satisfied: configparser in /usr/bin/python3.7/lib/python3.7/site-packages (3.7.4)
 

你可能感兴趣的:(linux,ubuntu,Gazebo)