安裝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位的包以後,一切都正常了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章