Python 3.7 anaconda environment - import _ssl DLL load fail error Python 3.7 anaconda environment - import _ssl DLL load fail error python-3.x python-3.x

Python 3.7 anaconda environment - import _ssl DLL load fail error


This can be fixed by manually adding in the PATH variables in PyCharm to the console.

  1. Open your Anaconda cmd
  2. Activate your Conda environment
  3. Get the full PATH value by typing echo %PATH%
    • if you are on Windows 7/can't copy the output, cd the cmd to your desktop and type echo %PATH% > path_val.txt
    • this will create a txt file so you can copy/paste the values easier.
  4. In PyCharm, go to Settings -> Build, Execution, Deployment -> Console -> Python Console -> click the folder on the right of Environment variables.
  5. Click the plus button to add a new Environment Variable
    • The name should be PATH
    • The value is the entire output from the echo %PATH% command above.
  6. Click OK, then apply.


I have answerd this here, to my understanding this error is caused by the missing/misplacement of libcrypto file in anaconda3/DLLs folder:

From anaconda3\Library\bin copy below files and paste them in anaconda3/DLLs:

-   libcrypto-1_1-x64.dll-   libssl-1_1-x64.dll 


You can try to set system environment variables, like "C:\Python\Anaconda3;C:\Python\Anaconda3\Scripts; C:\Python\Anaconda3\Library\bin;".

Only "C:\Python\Anaconda3\Scripts;" is not enough, and it works to me.