[Python] How do I ask `pip` to use the system certificates?

Discussão em 'Python' iniciado por Stack, Novembro 27, 2025.

  1. Stack

    Stack Membro Participativo

    My organisation recently updated certificates on my pc after which pip stopped working. I cannot get to any pypi package. I get the following error

    SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'))

    One workaround i found was to use the --use-feature=truststore option which is currently Experimental on pip. This fails as well because most of the subsequent setup commands that pip uses to install dependencies of a package still fail with the same error.

    example: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)'))': /simple/setuptools/

    Can someone please assist me on how i can ask pip to use the default certificates on my Windows(11) PC ?

    I took a look at relavant questions on this community, but nothing actually helped but this (partly).. https://pip.pypa.io/en/stable/topics/https-certificates/#

    Also I can ping pypi.python.org [​IMG]

    Continue reading...

Compartilhe esta Página