- 支持类库
sudo apt-get install python python-dev python-distribute python-pip libcurl4-openssl-dev libxml2-dev libxslt1-dev python-lxml libpcap-dev libpq-dev
- 安装pip
sudo apt-get install python-pip
- 安装phantomjs
sudo apt-get install phantomjs
- 安装pyspider
pip install pyspider
- 运行程序
pyspider
结果居然报错
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyspider/scheduler/scheduler.py", line 601, in xmlrpc_run
from pyspider.libs.wsgi_xmlrpc import WSGIXMLRPCApplication
File "/usr/local/lib/python2.7/dist-packages/pyspider/libs/wsgi_xmlrpc.py", line 18, in <module>
from six.moves.xmlrpc_server import SimpleXMLRPCDispatcher
ImportError: No module named xmlrpc_server
我了个大擦,谷歌了下,好像是six没有装
pip install -U six
- done!
尽情玩弄pyspider吧!