问题描述
今天在学习使用gerapy分布式爬虫管理框架时,在安装这一步就遇到了报错,报错如下:
ERROR: Cannot uninstall 'certifi'. 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.
翻译:
错误:无法卸载“证书”。这是一个 distutils 安装的项目,因此我们无法准确确定哪些文件属于它,这只会导致部分卸载。
应该是pip在内部运行pip uninstall certifi命令的时候出错了,尝试运行了一下pip uninstall certifi,发现报一样的错误:
只好去百度一下该怎么解决,最后找到解决方法了。
解决办法
运行命令:
pip install certifi --ignore-installed
运行完该命令后再次用pip install gerapy就不会报错,能成功安装gerapy。
参考文章:
https://blog.csdn.net/weixin_43332715/article/details/121895795
https://blog.csdn.net/chrisitian666/article/details/108773287