1. 程式人生 > >Scrapy Problem: "cannot import name 'opentype"

Scrapy Problem: "cannot import name 'opentype"

我在安裝並執行scrapy,發現有這樣的問題:

UserWarning:

You do not have a working installation of the service_identity module: 'cannot import name 'opentype''.

Please install it from <https://pypi.python.org/pypi/service_identity> and make sure all of its dependencies are satisfied.  Without the service_identity module, Twisted can perform only rudimentary TLS client hostname verification.  Many valid certificate/hostname mappings may be rejected.

解決方法如下:

pip install -I -U service_identity

或者

pip3 install -I -U service_identity

根據安裝的pip進行選擇。