在终端中启动pyspider时获取ImportError

时间:2018-05-30 23:38:49

标签: python python-3.x tornado macos-high-sierra pyspider

当我在终端中pyspider all启动pyspider时,会弹出一个ImportError

ImportError: cannot import name 'Curlasync_HTTPClient' from 'tornado.curl_httpclient'
(/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tornado/curl_httpclient.py)

错误消息中还有其他一些文本,但我认为这是主要原因。

我尝试通过重新安装龙卷风(4.5.3)重新安装龙卷风,但它似乎没有帮助。所以你们中的任何人都遇到过同样的问题?任何提示将不胜感激。提前谢谢。

配置信息:
macOS High Sierra 10.13.4
python版本:3.7.0a2
龙卷风版:4.5.3

1 个答案:

答案 0 :(得分:0)

该类名为CurlAsyncHTTPClient,而不是Curlasync_HTTPClient。看起来有人对asyncasync_进行了搜索和替换,因为在Python 3.7中async是一个保留字(但这里并不重要,因为它位于中间一个班级名称)。