Get_python_api is giving me SSL certification issue

→ Downloading to ‘D:\yolov7-gpu’
Detected platform:
Python 3.9
→ Checking if exists and is available
Traceback (most recent call last):
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\urllib\”, line 1346, in do_open
h.request(req.get_method(), req.selector,, headers,
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\http\”, line 1285, in request
self._send_request(method, url, body, headers, encode_chunked)
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\http\”, line 1331, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\http\”, line 1280, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\http\”, line 1040, in _send_output
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\http\”, line 980, in send
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\http\”, line 1454, in connect
self.sock = self._context.wrap_socket(self.sock,
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\”, line 501, in wrap_socket
return self.sslsocket_class._create(
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\”, line 1041, in _create
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\”, line 1310, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “D:\yolov7-gpu\”, line 175, in
urllib.request.urlretrieve(whl_file_URL, whl_file)
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\urllib\”, line 239, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\urllib\”, line 214, in urlopen
return, data, timeout)
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\urllib\”, line 517, in open
response = self._open(req, data)
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\urllib\”, line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\urllib\”, line 494, in _call_chain
result = func(*args)
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\urllib\”, line 1389, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File “D:\Python\Anaconda3\envs\yolov7-gpu-env\lib\urllib\”, line 1349, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)>

Hi team,
I am getting this error when I am trying to install python api.

1 Like

Hello and welcome to the forum,

Can you try to run from your venv

pip install --force-reinstall certifi

This is related to you python request package which has wrong certificates.


Hi alassagne we are getting the same issue

I have the same error