[英]requests.request not working in Python 3 on Mac
I am unable to use the requests library to run the following command: 我无法使用请求库来运行以下命令:
import requests
requests.request("GET", "https://www.google.com/")
This is the error message I'm getting: 这是我收到的错误消息:
Error: [('system library', 'fopen', 'No such file or directory'), ('BIO routines', 'BIO_new_file', 'no such file'), ('x509 certificate routines', 'X509_load_cert_crl_file', 'system lib')]
I'm running MacOS Sierra V 10.12.4 and using Python 3. 我正在运行MacOS Sierra V 10.12.4并使用Python 3。
My openssl version is: OpenSSL 1.0.2k 26 Jan 2017 我的openssl版本是:OpenSSL 1.0.2k 2017年1月26日
Any thoughts? 有什么想法吗?
Yes, this answer helped me. 是的,这个答案帮助了我。
Installing the certifi
module did the trick. 安装
certifi
模块可以解决问题。
urllib and "SSL: CERTIFICATE_VERIFY_FAILED" Error urllib和“ SSL:CERTIFICATE_VERIFY_FAILED”错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.