requests: `ImportError: No module named certifi` when using SSL
I did a fresh clone of the requests repo and get the following traceback when I try to POST to the following endpoint:
>>> requests.post('https://api.dropbox.com/1/oauth/request_token')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "requests/api.py", line 83, in post
return request('post', url, data=data, **kwargs)
File "requests/api.py", line 38, in request
return s.request(method=method, url=url, **kwargs)
File "requests/sessions.py", line 200, in request
r.send(prefetch=prefetch)
File "requests/models.py", line 454, in send
cert_loc = __import__('certifi').where()
ImportError: No module named certifi
This was after I attempted to run python setup.py build and navigated to the build/lib directory.
I realize that Requests leverages the full breadth of existing http packages out there, but do I really need to download an external dependency just to get out through https? Is there some way a fallback stub could be put in the place of this package?
Overall I’m in love with Requests and think the job you guys are doing is awesome. Keep up the great work!
About this issue
- Original URL
- State: closed
- Created 13 years ago
- Comments: 23 (14 by maintainers)
@davidpshaw a simple
pip install requeststakes care of everything.If you’re just having the certifi is missing error,
pip install certifi.