今天决定开始折腾scrapy。
python 3.5 scrapy 1.1 win10
比照官方文档(英文1.2.4版本,中文早期版本)
在执行scrapy crawl quotes
出现ImportError : cannot import name '_win32stdio'
,搜索SF找到解决方案,如下:
Scrapy can work with Python 3 on windows if you make some minor adjustments:
1.Copy the _win32stdio and _pollingfile to the appropriate directory under site-packages. Namely, twisted-dir\internet. Download these from https://github.com/twisted/twisted/tree/trunk/twisted/internet
2.pip install pypiwin32
Granted, this is based on my personal experience. Because the repository will certainly change in the future, readers should beware the age of this answer.
Update: the twisted-win package is no longer required because the appropriate files are now included in the twisted package.
我用了第一种方法就搞定了。感谢sf