安装scrapy时碰壁:'[twisted] CRITICAL: Unhandled error in Deferred'

运行scrapy demo时遇到这个一个错误,折腾了好几天

[twisted] CRITICAL: Unhandled error in Deferred

百度google过都没有给出直接原因,但大方向是因为我的环境是win8 64位机器下的pywin32包的问题,但反复安装64位的安装包都没解决的了。

后来再仔细阅读了pywin32关于如何选择包的提示,原来跟当前安装的python版本有关。python 64位和32位在64位机器下都可以跑,只是安装包时要选跟python版本一致的,而不是跟机器一致。

Some packages have a 32bit and a 64bit version available - you must download
the one which corresponds to the Python you have installed.  Even if you have
a 64bit computer, if you installed a 32bit version of Python you must install
the 32bit version of pywin32.

To determine what version of Python you have, just start Python and look at the
first line of the banner.  A 32bit build will look something like:

  Python 2.7.2+ ... [MSC v.1500 32 bit (Intel)] on win32
                                ^^^^^^^^^^^^^^

While a 64bit build will look something like:

  Python 2.7.2+ ... [MSC v.1500 64 bit (AMD64)] on win32
                                ^^^^^^^^^^^^^^

安装回32位的包以后,一切都正常了。

你可能感兴趣的:(python,scrapy)