Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: DLL load failed while importing _ssl: The specified module could not be found [duplicate]

I don't have much experience in programming, so I get confused with one problem, namely I cannot import ssl. When I execute my project in jupyter notebook - it works fine. But as soon as I move to the Visual Studio Code, import ssl yields

Traceback (most recent call last):
  File "c:\Users\...\Git\pytroch_geometric\pytorch_geometric\examples\link_pred.py", line 3, in <module>
    import ssl 
  File "C:\Users\...\anaconda3\lib\ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: DLL load failed while importing _ssl: The specified module could not be found.

Could somebody explain to me the cause? I saw exactly the same problem here, but unfortunately I do know where to find the files they are talking about.

Thanks!

like image 799
Python Avatar asked Jan 17 '26 12:01

Python


1 Answers

Add anaconda3\Library\bin to path in Environment Variables.

like image 145
Yana Avatar answered Jan 20 '26 04:01

Yana



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!