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.
- Open your Anaconda cmd
- Activate your Conda environment
- 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.
- if you are on Windows 7/can't copy the output, cd the cmd to your desktop and type
- In PyCharm, go to Settings -> Build, Execution, Deployment -> Console -> Python Console -> click the folder on the right of Environment variables.
- 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.
- The name should be
- 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 inanaconda3/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.