爬虫安装问题解决汇总

旧时模样 提交于 2020-01-11 05:18:43

爬虫安装问题解决汇总

pyspider的坑

Traceback (most recent call last):
  File "D:\python\Scripts\pyspider-script.py", line 11, in <module>
    load_entry_point('pyspider==0.3.10', 'console_scripts', 'pyspider')()
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 2443, in load
    return self.resolve()
  File "d:\python\lib\site-packages\pkg_resources\__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "d:\python\lib\site-packages\pyspider\run.py", line 231
    async=True, get_object=False, no_input=False):
        ^
SyntaxError: invalid syntax

解决方法:
1.因为async从python3.7开始不能用作参数名了,将所有脚本里面的async换一个名字即可.
2.修改下列python文件中的async为shark(全部替换)
run.py
fetcher\tornado_fetcher.py
webui\app.py
参考:https://blog.csdn.net/chengshawen7815/article/details/100991193

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!