Python 属性错误:模块';ssl';没有属性';协议TLSv1和x27;

Python 属性错误:模块';ssl';没有属性';协议TLSv1和x27;,python,ssl,Python,Ssl,在Windows上尝试导入请求库时,我在Python中遇到以下错误(同样的代码在Ubuntu上运行良好) 根据,我们可能应该将其更改为在3.5中使用ssl.PROTOCOL_TLS。希望能有所帮助。根据,我们可能应该将其更改为在3.5中使用ssl.PROTOCOL_TLS。希望有帮助。 Traceback (most recent call last): File "c:/Users/thomp/Documents/Coding Projects/Crawler/crawl.py&

在Windows上尝试导入请求库时,我在Python中遇到以下错误(同样的代码在Ubuntu上运行良好)

根据,我们可能应该将其更改为在3.5中使用ssl.PROTOCOL_TLS。希望能有所帮助。根据,我们可能应该将其更改为在3.5中使用ssl.PROTOCOL_TLS。希望有帮助。
Traceback (most recent call last):
  File "c:/Users/thomp/Documents/Coding Projects/Crawler/crawl.py", line 4, in <module>
    import requests
  File "C:\Users\thomp\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\__init__.py", line 103, in <module>
    from urllib3.contrib import pyopenssl
  File "C:\Users\thomp\AppData\Local\Programs\Python\Python38-32\lib\site-packages\urllib3\contrib\pyopenssl.py", line 84, in <module>
    ssl.PROTOCOL_TLSv1: OpenSSL.SSL.TLSv1_METHOD,
AttributeError: module 'ssl' has no attribute 'PROTOCOL_TLSv1'
astroid==2.4.2
beautifulsoup4==4.9.1
certifi==2020.6.20
cffi==1.14.1
chardet==3.0.4
colorama==0.4.3
cryptography==3.0
idna==2.10
isort==4.3.21
lazy-object-proxy==1.4.3
mccabe==0.6.1
pycparser==2.20
pylint==2.5.3
pyOpenSSL==19.1.0
requests==2.24.0
six==1.15.0
soupsieve==2.0.1
toml==0.10.1
urllib3==1.25.10
wrapt==1.12.1