卍 花径不曾缘客扫, 蓬门今始为君开. 古佛拈花方一笑, 痴人说梦已三生!

Mac下pyspider不兼容python3.7解决方法

Python 拈花古佛 7622℃ 0评论 繁體

pyspider 不兼容python3.7

安装之后运行命令

pyspider

报错async,是因为async从python3.7开始不能用作参数名了,将所有脚本里面的async换一个名字即可。

找到报错的文件将其中的async全部替换为自定义的变量名,比如说async1

我一共改了三个文件,如下图:
Mac下pyspider不兼容python3.7解决方法
还可能报错

raise ValueError("Invalid configuration:\n - "   "\n - ".join(errors))
ValueError: Invalid configuration:

Deprecated option ‘domaincontroller’: use ‘http_authenticator.domain_controller’ instead.

找到文件

\'domaincontroller\': NeedAuthController(app),

替换为:

   \'http_authenticator\':{
       \'HTTPAuthenticator\':NeedAuthController(app),
   },

Mac下运行pyspider 报错:ImportError:

ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (openssl)

解决方法

pip uninstall pycurl
export PYCURL_SSL_LIBRARY=nss
pip install pycurl --compile --no-cache-dir

然后再执行pyspider  就能够通过http://localhost:5000打开页面了

转载请注明:拈花古佛 » Mac下pyspider不兼容python3.7解决方法

喜欢 (0)or分享 (0)
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址