redhat下pyspider安装

1、软件环境

python 2.7.1

pip已安装

linux redhat 6.5企业版

2、安装依赖

yum install libxml2  libxml2-dev libxslt-devel 

3、安装lxml

下载http://lxml.de/index.html#download

解压用python setup.py install 安装即可

4、下载pyspider源码

https://github.com/binux/pyspider/tags

解压用python setup.py install 安装即可

5、安装phantomjs2.1

前置安装:

#yum -y install gcc gcc-c++ make flex bison gperf ruby \
openssl-devel freetype-devel fontconfig-devel libicu-devel sqlite-devel \
libpng-devel libjpeg-devel

然后下载安装

#git clone git://github.com/ariya/phantomjs.git
#cd phantomjs
#git checkout 2.1.1
#git submodule init
#git submodule update
#python build.py

最后 建立软链接   ln -s  /../phantomjs/bin/phantomjs /usr/bin/ 

常见问题:

一般是依赖没有安装或者版本不兼容,像python安装一般都这些问题。


ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (none/other)

解决:

pip uninstall pycurl
export PYCURL_SSL_LIBRARY=nss
easy_install pycurl


资料:

http://www.pyspider.cn/  pyspider中文网

http://docs.pyspider.org/en/latest/Quickstart/  官方

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值