
选择对应的python版本

pip install 文件名

换源安装pyspider:pip install pyspider -i https://pypi.doubanio.com/simple

安装成功

- 因为 pyspider 的作者在参数中用了async关键字
- Python 3.5中引入了async和await,它们在Python 3.7中成为关键字

修改pyspider里的async关键字
到python安装目录下,找到这三个文件,Ctrl + H ,将里面的 async 替换为任何非关键字以外的参数,比如 async123,然后保存
- Lib\site-packages\pyspider\run.py
- Lib\site-packages\pyspider\webui\app.py
- Lib\site-packages\pyspider\fetcher\tornado_fetcher.py(这个文件里的async记得区分大小写)
如果忘记安装目录,可以用pip --version查看

最后修改一个文件,解决这个问题:Deprecated option ‘domaincontroller‘: use ‘http_authenticator.domain_controller‘ instead.
- Lib\site-packages\pyspider\webui\webdav.py
将209行的
'domaincontroller': NeedAuthController(app),
修改为
'http_authenticator': {
'HTTPAuthenticator': NeedAuthController(app),
},
修改前

修改后


浏览器打开localhost:5000

pip install pyspider失败的解决办法
原文:https://www.cnblogs.com/jiyu-hlzy/p/12070814.html