# PythonCall SSL Verify Error when calling pd.read\_csv

**URL:** <https://discourse.julialang.org/t/pythoncall-ssl-verify-error-when-calling-pd-read-csv/115922>\
**Category:** New to Julia\
**Created:** [June 20, 2024, 2:35pm UTC](https://discourse.julialang.org/t/pythoncall-ssl-verify-error-when-calling-pd-read-csv/115922 "2024-06-20T14:35:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaketothepast](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jaketothepast/32/207193_2.png) [@jaketothepast](https://discourse.julialang.org/u/jaketothepast)\
**Post date:** [June 20, 2024, 2:35pm UTC](https://discourse.julialang.org/t/pythoncall-ssl-verify-error-when-calling-pd-read-csv/115922/1 "2024-06-20T14:35:45Z")

</div>

Hello, I’m trying to read a CSV file with Pandas, and I’m getting the following error:

```julia
function example52()
    points = pd.read_csv("https://raw.githubusercontent.com/thomasnield/machine-learning-demo-data/master/regression/single_independent_variable_linear_small.csv", delimiter=pystr(",")).itertuples()
end

```

And the stack trace

```julia
ERROR: Python: URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>
Python stacktrace:
 [1] do_open
   @ urllib.request ~/work/MathForDataScience/.CondaPkg/env/lib/python3.12/urllib/request.py:1347
 [2] https_open
   @ urllib.request ~/work/MathForDataScience/.CondaPkg/env/lib/python3.12/urllib/request.py:1392

```

I know this is probably due to how the Conda environment is configured. I use CondaPkg with no additional configuration, which looks like it uses MicroMamba to do the Python management. I already had to use CondaPkg to downgrade SSL to 3.3.0 so that the Python SSL module could find it, but stuck on this error now.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [June 20, 2024, 2:46pm UTC](https://discourse.julialang.org/t/pythoncall-ssl-verify-error-when-calling-pd-read-csv/115922/2 "2024-06-20T14:46:33Z")

</div>

You need to downgrade OpenSSL to 3.0. Julia is currently tracking the OpenSSL LTS.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [June 20, 2024, 2:48pm UTC](https://discourse.julialang.org/t/pythoncall-ssl-verify-error-when-calling-pd-read-csv/115922/3 "2024-06-20T14:48:55Z")

</div>

@cjdoris , I am wondering if could consider pinning package versions of some dependencies to match the corresponding dependency versions that Julia uses. That might be able to avoid situations like this.

---

<div class="post-metadata">

**Author:** ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Post date:** [June 20, 2024, 4:40pm UTC](https://discourse.julialang.org/t/pythoncall-ssl-verify-error-when-calling-pd-read-csv/115922/4 "2024-06-20T16:40:30Z")

</div>

Yep we already do this for libstdc++ here: [CondaPkg.jl/src/resolve.jl at 9b73ea5c68bd7e19ba7a946e0ebf96542d0ace4f · JuliaPy/CondaPkg.jl · GitHub](https://github.com/JuliaPy/CondaPkg.jl/blob/9b73ea5c68bd7e19ba7a946e0ebf96542d0ace4f/src/resolve.jl#L121)

Feel free to make a PR with similar functionality for OpenSSL.

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [March 10, 2025, 10:29am UTC](https://discourse.julialang.org/t/pythoncall-ssl-verify-error-when-calling-pd-read-csv/115922/5 "2025-03-10T10:29:40Z")

</div>

I have what it looks the same problem with Julia 1.11 using the python package [chelsa-cmip6](https://pypi.org/project/chelsa-cmip6/#description) that downloads climatic data (apparently using pandas), installed using `CondaPkg.add_pip()`.

I got the following error:

```julia
ERROR: Python: URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)>
Python stacktrace:
 [1] do_open
   @ urllib.request ~/.julia/dev/GenFSM/test/.CondaPkg/.pixi/envs/default/lib/python3.11/urllib/request.py:1351
 [2] https_open
   @ urllib.request ~/.julia/dev/GenFSM/test/.CondaPkg/.pixi/envs/default/lib/python3.11/urllib/request.py:1391
...
 [7] urlopen
   @ pandas.io.common ~/.julia/dev/GenFSM/test/.CondaPkg/.pixi/envs/default/lib/python3.11/site-packages/pandas/io/common.py:289
...
 [17] chelsa_cmip6
   @ chelsa_cmip6.GetClim ~/.julia/dev/GenFSM/test/.CondaPkg/.pixi/envs/default/lib/python3.11/site-packages/chelsa_cmip6/GetClim.py:455

```

I haven’t understood the previous answers (I don’t know Conda nor OpenSSL). Is it a package at the level of the OS (Ubuntu) that I need to downgrade ? As the code is to go into a package, is there a way to make this issue OS-independent ?

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [March 10, 2025, 11:25am UTC](https://discourse.julialang.org/t/pythoncall-ssl-verify-error-when-calling-pd-read-csv/115922/6 "2025-03-10T11:25:04Z")

</div>

How you did it ?
