您的位置:首页 > 其它

安装爬虫框架PySpider遇到的一个问题

2017-06-19 23:16 393 查看
在 cmd 命令下,使用 pip install pyspider,成功安装

Installing collected packages: pyspider
Running setup.py install for pyspider ... done
Successfully installed pyspider-0.3.9


然后输入命令 pyspider all,报错:

C:\WINDOWS\system32>pyspider all
Traceback (most recent call last):
File "C:\Program Files (x86)\Python27\Scripts\pyspider-script.py", line 5, in <module>
from pkg_resources import load_entry_point
File "C:\Program Files (x86)\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py", line 2603, in <module>
File "C:\Program Files (x86)\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py", line 666, in require
File "C:\Program Files (x86)\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg\pkg_resources.py", line 565, in resolve
pkg_resources.DistributionNotFound: wsgidav


按字面来看,应该就是少了 wsgidav。 那就安装咯:pip install wsgidav

然而发现,已经安装了。。。以为是版本不匹配,然后我就uninstall了wsgidav和pyspider,再重新安装。

结果依然不行。。。Orz…

最后搜到一个网址解决了我的问题

https://stackoverflow.com/questions/27018999/python-pip-pkg-resources-distributionnotfound

C:\WINDOWS\system32>pip install -U setuptools
Collecting setuptools
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fc/cb/748dcabb152fbc7eceaf585d052b8bc11cf028b917a7d2343cf1e0c092c3/setuptools-36.0.1-py2.py3-none-any.whl (476kB)

Installing collected packages: setuptools
Found existing installation: setuptools 0.6rc11
Uninstalling setuptools-0.6rc11:
Successfully uninstalled setuptools-0.6rc11
Successfully installed setuptools-36.0.1


再尝试命令 pyspider all,成功运行

C:\WINDOWS\system32>pyspider all
C:\Program Files (x86)\Python27\lib\site-packages\pyspider\libs\utils.py:186: FutureWarning: timeout is not supported on your platform.
warnings.warn("timeout is not supported on your platform.", FutureWarning)
[W 170619 22:56:27 run:413] phantomjs not found, continue running without it.
[I 170619 22:56:29 result_worker:49] result_worker starting...
[I 170619 22:56:32 processor:211] processor starting...
[I 170619 22:56:35 tornado_fetcher:638] fetcher starting...
[I 170619 22:56:39 scheduler:647] scheduler starting...
[I 170619 22:56:40 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0
[I 170619 22:56:40 scheduler:782] scheduler.xmlrpc listening on 127.0.0.1:23333
[I 170619 22:56:41 app:76] webui running on 0.0.0.0:5000
[I 170619 22:57:40 scheduler:586] in 5m: new:0,success:0,retry:0,failed:0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: