apt-get update 出现 python 错误提示

但进入python中import chardet 是没有报错的,重装几次chardet(pip install chardet)问题依然存在,而且查询pip list发现chardet已经安装成功了

纠结了很久,百度了很多还是没有找到准确的解决方案,无意中翻到ubuntu里面有一个类似的链接:https://askubuntu.com/questions/246970/apt-get-broken-no-module-named-debian-deb822,里面有几个回答引起了我的注意:

python-chardet这个模块是可以reinstall?那之前pip install chardet 是不是搞错了?于是
sudo apt install --reinstall python3-debian python3-chardet

问题解决:

搞了一个上午,唉,

在kali Linux中执行apt-get update时遇到了'No module named 'chardet''的错误,尽管在python环境中导入chardet没有问题,且通过pip安装chardet也显示成功。尝试通过pip reinstall和重新安装python-chardet及python3-chardet解决了问题。
3万+

被折叠的 条评论
为什么被折叠?



