[Python] certificate verify failed: unable to get local issuer certificate

Discussão em 'Python' iniciado por Stack, Junho 12, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to get data from the web using Python. I imported urllib.request but while executing I got:


    certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)
    ​

    I am using Python 3.7 on Mac OS High Sierra and am trying to get this CSV file. When I changed the URL to http I was able to get the data, but this avoids checking the SSL certificate.

    Run /Applications/Python\ 3.7/Install\ Certificates.command solved my problem. But how exactly did this solve my issue? My question differs from openssl, python requests error: "certificate verify failed" because I want to know what actually happens when I install certifi package or run Install\ Certificates.command to fix the error.

    Continue reading...

Compartilhe esta Página