Scyall安装填坑--pycurl的安装与卸载
之前看到python3.6出了一个免费代理的库Scyall,想安装一下试试,结果遇到了两个坑,现在把解决方案放在下面。
1.Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-xsrljabf/pycurl/
按照官方文档,使用pip安装Scylla,
(从github拷贝源码出现同样的问题)
结果出现问题:
首先参考这篇博客,
sudo python -m pip install --upgrade --force pip
sudo pip install setuptools==39.2.0
升级pip,并没有解决问题。
后来查询stackoverflow,找到解决方案:
错误是在安装pycurl时产生的,运行以下语句:
sudo apt-get install libcurl4-gnutls-dev librtmp-dev
(我是上面两个步骤都运行后得以正常安装,所以不确定只运行第二个步骤就能解决问题。)
2.Cannot uninstall 'pycurl'. 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.
经上面步骤后,第一次安装时没有加sudo,导致权限不够,安装中止,但此时已安装pycurl。第二次安装时,安装步骤需要卸载pycurl,结果无法卸载:
参考这篇博客,找到pycurl的.egg-info文件,删除之后安装,就可以了。