What this error means

Python raised CERTIFICATE_VERIFY_FAILED because it could not build a trusted TLS certificate chain for the server it contacted.

Common causes

  • The local CA bundle is outdated.
  • A proxy or antivirus tool intercepts HTTPS traffic with a custom certificate.
  • The server certificate is expired, incomplete, or issued for a different hostname.
  • Your machine clock is wrong, making a valid certificate appear expired or not yet valid.

Quick fixes

  1. Upgrade Python certificate packages:
   python -m pip install --upgrade pip certifi
  1. Check your system date and time.
  2. If you are on a corporate network, install the organization root certificate through the approved system process.
  3. Retry the command.

Step-by-step troubleshooting

  1. Identify whether the failure happens in pip, requests, urllib, or a specific SDK.
  2. Visit the target URL in a browser and inspect the certificate chain.
  3. Run the command from a different network to check whether a proxy is involved.
  4. Update operating system certificate bundles.
  5. Configure the client to use the correct trusted CA bundle instead of disabling verification.