Search code examples
pythonpython-2.7scrapy

python No module named service_identity


I tried to update scrapy and when I tried to check the version I got the following error

C:\Windows\system32>scrapy version -v
:0: UserWarning: You do not have a working installation of the service_identity
module: 'No module named service_identity'.  Please install it from <https://pyp
i.python.org/pypi/service_identity> and make sure all of its dependencies are sa
tisfied.  Without the service_identity module and a recent enough pyOpenSSL to s
upport it, Twisted can perform only rudimentary TLS client hostname verification
.  Many valid certificate/hostname mappings may be rejected.
Scrapy  : 0.22.2
lxml    : 3.2.3.0
libxml2 : 2.9.0
Twisted : 14.0.0
Python  : 2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]
Platform: Windows-7-6.1.7601-SP1

what is that please and how to solve it ?

I am using windows 7


Solution

  • pip install service_identity
    

    It is complaining that you do not have service_identity.

    More information on the module can be found here on PyPI


    Note that this is a rather unusual scenario, because service_identity is not a requirement of the twisted package, whose developers for some reason chose not to add it to its list of dependencies (cf. pyproject.toml), instead raising UserWarning about lack of this package, and requiring a manual intervention to fix.