解决安装gerapy的时候报错:ERROR: Cannot uninstall ‘certifi‘. It is a distutils installed project...

问题描述

今天在学习使用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

猜你喜欢

转载自blog.csdn.net/ungoing/article/details/125188082
今日推荐