urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)

We Are Going To Discuss About urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108). So lets Start this Python Article.

<h2 id="h-urllib.error.urlerror:-urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
  1. How to solve urllib.error.URLError:

    Here are the steps for the MacOs:
    Open the finder
    Find the version of Python that you are using
    Click on the arrow beside Python
    A list will show up under the Python
    Click on the “Install Certificates.command”. It will open a terminal and install the certificate.
    In my case, I had to do this 2 times before it works.
    Here is a screenshot from the Finder:

  2. urllib.error.URLError:

    Here are the steps for the MacOs:
    Open the finder
    Find the version of Python that you are using
    Click on the arrow beside Python
    A list will show up under the Python
    Click on the “Install Certificates.command”. It will open a terminal and install the certificate.
    In my case, I had to do this 2 times before it works.
    Here is a screenshot from the Finder:

Solution 1

Here are the steps for the MacOs:

  1. Open the finder
  2. Find the version of Python that you are using
  3. Click on the arrow beside Python
  4. A list will show up under the Python
  5. Click on the “Install Certificates.command”. It will open a terminal and install the certificate.

In my case, I had to do this 2 times before it works.
Here is a screenshot from the Finder:

enter image description here

Original Author TJ1 Of This Content

Solution 2

A quick google search returns the following: http://blog.wafrat.com/fixing-certificate_verify_failed-when-using-yfinances-ticker-info/

As explained in the website linked above, the issue is due to:

It turns out it’s because I am running Python on Mac OS and I need to install some certificates (Mac OSX python ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)).

And the solution is to:

So I opened Finder and navigated to Applications, Python 3.7, then ran Install Certificates.command. And it worked indeed!

Original Author MartinNajemi Of This Content

Solution 3

I had this problem using Anaconda with Python 3.9, and on Windows – the solution for me was in this answer: How to get and save LetsEncrypt certificates on Windows.

The process is:

For this part import the ISRG certs into the ‘Certificates/Personal’ folder, and import the Let’s Encrypt R3 cert into the ‘Trusted Root Certification Authorities/Certificates’ folder.

  • Restart system.

Original Author zgparsons Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment