|
|
地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycurl
選擇對應的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),
},
修改前
修改后
|