pip install pyspider failed solution

An error




Download Library pycurl

Address: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycurl

Select the corresponding version of python




Installation pycurl library

pip install the file name




Installation pyspider library

In other source installation pyspider :pip install pyspider -i https://pypi.doubanio.com/simple

Successful installation




At this time, the error will be run pyspider

  • Because the author pyspider in par with the async keyword
  • Python 3.5 introduced async and await, they become the keyword in Python 3.7




Modify pyspider in the async keyword

Next to the python installation directory, locate these three documents, Ctrl + H, which will be replaced with the async parameters other than any non-keyword, such as async123, then save

  • Lib\site-packages\pyspider\run.py
  • Lib\site-packages\pyspider\webui\app.py
  • Lib \ site-packages \ pyspider \ fetcher \ tornado_fetcher.py (in this file async remember the case-sensitive)

If you forget the installation directory, you can use pip --version View




Last modified a file, to solve this problem: 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),
    },







Installed



Browser opens localhost: 5000




Guess you like

Origin www.cnblogs.com/jiyu-hlzy/p/12070814.html