question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`ImportError: No module named certifi` when using SSL

See original GitHub issue

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!

Issue Analytics

  • State:closed
  • Created 12 years ago
  • Comments:23 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
kennethreitzcommented, Jan 26, 2012

@davidpshaw a simple pip install requests takes care of everything.

If you’re just having the certifi is missing error, pip install certifi.

0reactions
swhshamsicommented, Feb 25, 2017

@kennethreitz Thanks, I had same issue and is resolved by that command pip install requests just saved my life.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named certifi - python - Stack Overflow
Go to your applications folder > find your python version folder -> double click on the file Install Certificates.command inside the python ...
Read more >
[Fixed] ModuleNotFoundError: No module named 'certifi'
Quick Fix: Python raises the ImportError: No module named 'certifi' when it cannot find the library certifi . The most frequent source of...
Read more >
How to solve ImportError: No module named certifi - Super User
I am using Debian Testing, and I am trying to install couple modules one them is the discog client. However I keep hitting...
Read more >
ssl — TLS/SSL wrapper for socket objects — Python 3.11.1 ...
This module provides access to Transport Layer Security (often known as “Secure Sockets Layer”) encryption and peer authentication facilities for network ...
Read more >
Problems with modules : r/learnpython - Reddit
when using the command python [name_of_the_script] , it returns: ImportError: No module named github. when using the command python3 [name_of_the_script] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found