did a sudo apt update && sudo apt full-upgrade -y and received the following error:
>>>File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser' <<<
After reading I think this is related to either a manual fiddling somewhere in /usr/bin (Now I have read never to do that, but I can't recall if ever I did in the past...), or something related to the default python version the distro requires.
This is what I can see in terms of the python on the system: /usr/bin/python is a link to python2 and python2 is a link to python2.7.
Not sure but is this pointing to the correct version? Is it even related to the error above?
sudo apt -f --reinstall install python-configparser also give similar error
>>> Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 62.6 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://kali.download/kali kali-rolling/main amd64 python-configparser all 3.5.0b2-3 [62.6 kB]
Fetched 62.6 kB in 1s (57.7 kB/s)
(Reading database ... 402234 files and directories currently installed.)
Preparing to unpack .../python-configparser_3.5.0b2-3_all.deb ...
Unpacking python-configparser (3.5.0b2-3) over (3.5.0b2-3) ...
Setting up mercurial-common (5.4.1-1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
dpkg: error processing package mercurial-common (--configure):
installed mercurial-common package post-installation script subprocess returned error exit status 1
Setting up python-configparser (3.5.0b2-3) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
dpkg: error processing package python-configparser (--configure):
installed python-configparser package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mercurial:
mercurial depends on mercurial-common (= 5.4.1-1); however:
Package mercurial-common is not configured yet.
dpkg: error processing package mercurial (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mercurial-common
python-configparser
mercurial
<<<<
I also tried using etc/alternatives to point python to version 3.8, but problem still persists.
Any idea ? Much appreciated.