# Python API : struggling with SSL certificate error on downloading the package

**URL:** <https://community.stereolabs.com/t/python-api-struggling-with-ssl-certificate-error-on-downloading-the-package/2139>\
**Category:** Python\
**Tags:** python, windows\
**Created:** [February 17, 2023, 11:37am UTC](https://community.stereolabs.com/t/python-api-struggling-with-ssl-certificate-error-on-downloading-the-package/2139 "2023-02-17T11:37:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![riccardokhm](https://community.stereolabs.com/user_avatar/community.stereolabs.com/riccardokhm/32/1031_2.png) [@riccardokhm](https://community.stereolabs.com/u/riccardokhm)\
**Post date:** [February 17, 2023, 11:37am UTC](https://community.stereolabs.com/t/python-api-struggling-with-ssl-certificate-error-on-downloading-the-package/2139/1 "2023-02-17T11:37:04Z")

</div>

Hi guys,  
I;m trying to download and install Python API on my Windows 10 PC. Unfortunately on running the get\_python\_api script an ssl certificate error appear, like the one below:

urlopen error [SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed: certificate has expired (\_ssl.c:997)\>

I tried to installed it manually but when calling the sl object on the tutorials no definition are found.  
Any idea?

---

<div class="post-metadata">

**Author:** ![alassagne](https://community.stereolabs.com/user_avatar/community.stereolabs.com/alassagne/32/2428_2.png) [@alassagne](https://community.stereolabs.com/u/alassagne)\
**Post date:** [February 20, 2023, 4:07pm UTC](https://community.stereolabs.com/t/python-api-struggling-with-ssl-certificate-error-on-downloading-the-package/2139/2 "2023-02-20T16:07:44Z")

</div>

Hello and thank you for contacting us,  
Your python request module does not work correctly. You can try to repair it with

```auto
python -m pip install certifi

```

As of the trouble you have after installing the module manually, what is the exact error message ?

Antoine

---

<div class="post-metadata">

**Author:** ![riccardokhm](https://community.stereolabs.com/user_avatar/community.stereolabs.com/riccardokhm/32/1031_2.png) [@riccardokhm](https://community.stereolabs.com/u/riccardokhm)\
**Post date:** [February 20, 2023, 4:17pm UTC](https://community.stereolabs.com/t/python-api-struggling-with-ssl-certificate-error-on-downloading-the-package/2139/3 "2023-02-20T16:17:39Z")

</div>

Hi! Thanks a lot for your reply! unfortunately certify package is already installed and up to date. As for the manual installation, I eventually managed to install it but in the package list I have only pyzed (3.8) ( and not pyzed.sl as in the doc) and pyzmq: on calling the object sl no definition are anyway available. I don’t really know what it could be.

---

<div class="post-metadata">

**Author:** ![alassagne](https://community.stereolabs.com/user_avatar/community.stereolabs.com/alassagne/32/2428_2.png) [@alassagne](https://community.stereolabs.com/u/alassagne)\
**Post date:** [February 20, 2023, 4:36pm UTC](https://community.stereolabs.com/t/python-api-struggling-with-ssl-certificate-error-on-downloading-the-package/2139/4 "2023-02-20T16:36:43Z")

</div>

Hello, as I said, I need the exact error message. What happens on

```auto
import pyzed.sl as sl

```

?

Also, with certifi, you can try

```auto
pip install --force-reinstall certifi

```

---

<div class="post-metadata">

**Author:** ![riccardokhm](https://community.stereolabs.com/user_avatar/community.stereolabs.com/riccardokhm/32/1031_2.png) [@riccardokhm](https://community.stereolabs.com/u/riccardokhm)\
**Post date:** [February 21, 2023, 8:24am UTC](https://community.stereolabs.com/t/python-api-struggling-with-ssl-certificate-error-on-downloading-the-package/2139/5 "2023-02-21T08:24:32Z")

</div>

Here attached the VS screenshot. I think it’s not the correct package probably.

 ![image](https://community.stereolabs.com/uploads/default/original/2X/7/74e16022d1562c144dbb3936ac98ae2fed7ef25a.png)

---

<div class="post-metadata">

**Author:** ![riccardokhm](https://community.stereolabs.com/user_avatar/community.stereolabs.com/riccardokhm/32/1031_2.png) [@riccardokhm](https://community.stereolabs.com/u/riccardokhm)\
**Post date:** [February 21, 2023, 10:15am UTC](https://community.stereolabs.com/t/python-api-struggling-with-ssl-certificate-error-on-downloading-the-package/2139/6 "2023-02-21T10:15:48Z")

</div>

Here instead the error that appears when trying to download the API.

 ![image](https://community.stereolabs.com/uploads/default/original/2X/c/c4066b96c5aaae700a6ff0b9f6949dd1e853f65c.png)

---

<div class="post-metadata">

**Author:** ![riccardokhm](https://community.stereolabs.com/user_avatar/community.stereolabs.com/riccardokhm/32/1031_2.png) [@riccardokhm](https://community.stereolabs.com/u/riccardokhm)\
**Post date:** [February 21, 2023, 10:58am UTC](https://community.stereolabs.com/t/python-api-struggling-with-ssl-certificate-error-on-downloading-the-package/2139/7 "2023-02-21T10:58:04Z")

</div>

Actually i solved the entire issue by deactivating the SSL verification after importing the ssl package and setting up the entire context to avoid such double check with the ssl.\_create\_default\_https\_context = ssl.\_create\_unverified\_context command.

---

<div class="post-metadata">

**Author:** ![alassagne](https://community.stereolabs.com/user_avatar/community.stereolabs.com/alassagne/32/2428_2.png) [@alassagne](https://community.stereolabs.com/u/alassagne)\
**Post date:** [February 21, 2023, 1:23pm UTC](https://community.stereolabs.com/t/python-api-struggling-with-ssl-certificate-error-on-downloading-the-package/2139/8 "2023-02-21T13:23:18Z")

</div>

Your code as an issue. It should be

```auto
import pyzed.sl as sl

```

instead of

```auto
import pyzed as sl

```

Antoine
