Centos下配置pyspider
1.安装
pip3 install pyspider
2.错误
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-p0k3l2j5/pycurl/
这是因为 pyspider
依赖 pycurl
这个库,而 pycurl
又要求系统中存在相对应的库
解决方案:
# Ubuntu
apt-get install libcurl4-gnutls-dev
# Centos
yum install libcurl-devel
![](https://img2018.cnblogs.com/blog/1443999/201909/1443999-20190906223853359-1440901054.png)
pip3 install pycurl
![](https://img2018.cnblogs.com/blog/1443999/201909/1443999-20190906223930356-853831910.png)
# export PYCURL_SSL_LIBRARY=openssl
# export PYCURL_SSL_LIBRARY=nss
pip3 install pyspider
![](https://img2018.cnblogs.com/blog/1443999/201909/1443999-20190906224021356-1980622447.png)