首页 > 解决方案 > 无法找出 service_identity 模块错误的原因

问题描述

错误是:

UserWarning: You do not have a working installation of the service_identity module: 'cannot import name 'verify_ip_address' from 'service_identity.pyopenssl' (C:\Users\techn\Anaconda3\lib\site-packages\service_identity\pyopenssl.py)'. 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 cryptography
pip install cffi --upgrade
pip install service_identity --upgrade
pip install pyopenssl --upgrade

标签: pythonwindowsscrapy

解决方案


想通了,我需要做conda install service_identity


推荐阅读