Cannot uninstall chardet

倾然丶 夕夏残阳落幕 提交于 2019-12-10 13:34:58

问题


I've been trying to uninstall chardet using pip, but I get the following error:

"Cannot uninstall 'chardet'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall."

My pip version is 10.0.0, python 2.7.14, Ubuntu 14.04.


回答1:


The location of chardet can be determined by running the following commands in the python console.

>>> import chardet
>>> print chardet.__file__
/usr/lib/python2.7/dist-packages/chardet/__init__.pyc

Then just manually remove the following folders/*.egg-info file.

rm /usr/lib/python2.7/dist-packages/chardet-<your-version>.egg-info
rm -r /usr/lib/python2.7/dist-packages/chardet


来源:https://stackoverflow.com/questions/49915951/cannot-uninstall-chardet

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!