1、下载解压phantomjs文件,并设置环境变量,
本人的phantomjs 是直接下载的phantomjs压缩文件,直接解压的,需要把它加入环境变量,不然pyspider 运行时找不到phantomjs
(1)编辑 /etc/profile 在最后加入export PATH=${PATH}:/usr/local/soft_download/python_file/phantomjs/bin (即phantomjs的解压后的bin目录,也就是执行文件所在的目录,注意,要把bin目录下的phantomjs的权限设置为可执行,使用chmod u+x phantomjs )
(2)使profile文件生效source /etc/profile
2、 安装pyspider
(1)首先要安装easy_install,本人系统是centos7,使用pip无法安装pyspider,然后 easy_install pyspider
(2)运行:pyspider all