Python导入service_identity错误:无法导入名称DNSName

时间:2019-01-30 21:11:13

标签: python scrapy

我开始学习Scrapy并收到此错误消息。我已经用谷歌搜索并安装/升级了service_identity和相关的python包,但是在导入service_identity时仍然收到相同的错误。

  • 操作系统:Windows 7 64位
  • Python:2.7.15 Anaconda
  • service_identity:18.1.0
  • pyopenssl:17.5.0
  • pyasn1:0.4.5
  • pyasn1-modules:0.2.3

错误消息:

import service_identity
Traceback (most recent call last):

  File "ipython-input-2-709fa376dd62", line 1, in <module>
    import service_identity

  File "C:\anaconda2\lib\site-packages\service_identity\__init__.py", line 7, in <module>
    from . import cryptography, pyopenssl

  File "C:\anaconda2\lib\site-packages\service_identity\cryptography.py", line 9, in <module>
    from cryptography.x509 import (

ImportError: cannot import name DNSName

0 个答案:

没有答案