ubuntu14.04 splash安装

来源:互联网 发布:电商软件营销方案 编辑:程序博客网 时间:2024/04/30 20:36

ubuntu14.04 splash安装

splash 是一个python语言编写的用于配合scrapy解析js的库,本来以为安装比较简单,没想到记录下来以后,发现其实还是很麻烦的,所以发出来共享一下

  1. splash运行于python3环境下,所以先安装pip3,sudo apt-get install python3-pip
  2. 安装re2扩展库,详细可以查看这篇文章http://stackoverflow.com/questions/36969878/pip-install-re2-gives-an-error;

如果在安装re的过程中出现ln: failed to create symbolic link ‘obj/so/libre2.so’: Operation not supported的错误,是因为obj/so/下面不存在这个文件,可以手动重命名或者复制libre2.so.0为libre2.so

  1. 其他依赖 sudo apt-get install libjpeg-dev liblua5.1-0-dev python3-pyqt5 libqt5webkit5-dev python3-pyqt5.qtsvg python3-pyqt5.qtwebkit firefox xvfb
  2. python3扩展包 sudo pip3 install selenium
  3. 克隆splash项目git@github.com:scrapinghub/splash.git, 然后进入splash项目内执行sudo pip3 install --default-timeout=100 -r requirements.txt
  4. 如果缺其他插件可以根据提示自行下载,运行splash,进入splash项目内,执行python3 -m splash.server
1 0
原创粉丝点击