安装pyspider

1 #安装libcurl-devel
2 yum install libcurl-devel -y
1 #卸载pycurl
2 pip uninstall pycurl
3 #将export PYCURL_SSL_LIBRARY=openssl写入~/.bashrc
4 vi /root/.bashrc
5 插入 export PYCURL_SSL_LIBRARY=openssl
6 source /root/.bashrc
7 #再次安装
8 pip install pycurl
1 #安装pyspider
2 pip install pyspider

 

1 #运行时会报错
2 pip uninstall pycurl 
3 pip install --no-cache-dir --compile --ignore-installed --install-option="--with-nss" pycurl 
4 vim ~/.bashrc 
5 修改:export PYCURL_SSL_LIBRARY=nss 
6 source ~/.bashrc
7 pip uninstall pyspider 
8 pip install pyspider
9 #之后运行

 

posted @ 2018-11-29 17:18  面向bug编程  阅读(101)  评论(0)    收藏  举报