简体   繁体   中英

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.

My openssl version is: OpenSSL 1.0.2k 26 Jan 2017

Any thoughts?

Yes, this answer helped me.

Installing the certifi module did the trick.

urllib and "SSL: CERTIFICATE_VERIFY_FAILED" Error

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM