ModuleNotFoundError: No module named 'chardet' - ('pip install chardet' not working)

nethunter

New Member
Joined
May 7, 2022
Messages
1
Reaction score
0
Credits
24
Hi, I have an Ubuntu 21.10 Instance on Multipass. Windows. I'm trying to upgrade to 22.04. "sudo do-release-upgrade." During installation, I get an error about dpkg.

Errors were encountered while processing:
update-notifier-common
ubuntu-server

So I ran "sudo dpkg --configure -a." Here's the error...

sudo dpkg --configure -a
Setting up update-notifier-common (3.192.54) ...
Traceback (most recent call last):
File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
import debian.deb822
File "/usr/lib/python3/dist-packages/debian/deb822.py", line 240, in <module>
import chardet
ModuleNotFoundError: No module named 'chardet'
dpkg: error processing package update-notifier-common (--configure):
installed update-notifier-common package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of ubuntu-server:
ubuntu-server depends on update-notifier-common; however:
Package update-notifier-common is not configured yet.

dpkg: error processing package ubuntu-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
update-notifier-common
ubuntu-server


I tried "pip3 install chardet." And "pip install chardet." It says it's installed correctly. In Python 3.10. I tried "--force-reinstallation." Same error. So how do I install chardet? And get my upgrade working? And dpkg --configure -a? I also tried "sudo apt --fix-broken install." It gave a dpkg error.

So, how do I finish my upgrade? And install chardet? PATH? Please reply. Thanks
 


f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,624
Reaction score
3,329
Credits
33,554
You could try installing the following package.
Code:
sudo apt install python3-chardet
After that you could try running the first command you mentioned again.
Code:
sudo dpkg --configure -a
 

kc1di

Well-Known Member
Joined
May 14, 2021
Messages
984
Reaction score
830
Credits
7,006
you may want to consider upgrading also as 21.10 will reach EOL in July anyway.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top