每当我在Python代码中尝试import requests
时,我都会遇到如下错误:
Traceback (most recent call last):
File "C:/Users/V/Desktop/PY/web_scrape/zoro copy.py", line 2, in <module>
import requests
File "C:\Python27\lib\site-packages\requests\__init__.py", line 84, in <module>
from urllib3.contrib import pyopenssl
File "C:\Python27\lib\site-packages\urllib3\contrib\pyopenssl.py", line 47, in <module>
from cryptography import x509
File "C:\Python27\lib\site-packages\cryptography\x509\__init__.py", line 9, in <module>
from cryptography.x509.base import (
File "C:\Python27\lib\site-packages\cryptography\x509\base.py", line 16, in <module>
from cryptography.x509.extensions import Extension, ExtensionType
File "C:\Python27\lib\site-packages\cryptography\x509\extensions.py", line 13, in <module>
from asn1crypto.keys import PublicKeyInfo
File "C:\Python27\lib\site-packages\asn1crypto\keys.py", line 22, in <module>
from ._elliptic_curve import (
File "C:\Python27\lib\site-packages\asn1crypto\_elliptic_curve.py", line 51, in <module>
from ._int import inverse_mod
File "C:\Python27\lib\site-packages\asn1crypto\_int.py", line 52, in <module>
if platform.python_implementation() == 'PyPy':
File "C:\Python27\Lib\platform.py", line 1417, in python_implementation
return _sys_version()[0]
File "C:\Python27\Lib\platform.py", line 1383, in _sys_version
repr(sys_version))
ValueError: failed to parse CPython sys.version: '2.7.13 |Continuum Analytics, Inc.| (default, May 11 2017, 13:17:26) [MSC v.1500 64 bit (AMD64)]'
知道怎么解决这个问题吗?非常感谢你。