python请求SSL问题
HTTPSConnectionPool(host=‘cgateway.bjmantis.net.cn’, port=443): Max retries exceeded with url: /scrm-course-api/pass/loginNoCode (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)’)))
解决方案:
pip install pip-system-certs
pip install --upgrade certifi
如果安装不上,开代理或者更换镜像源
(Caused by SSLError(SSLEOFError(8, ‘[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)’)))
解决方案:
pip install urllib3==1.26.18
其他方案
pip install --upgrade requests
pip install --upgrade urllib3