Stack: windows 8.1 Anaconda2/python 3.7 env Pycharm professional 2017.3
Problem: Can't import ssl module (narrowed down the problem to loading _ssl.pyd):
ImportError: DLL load failed: The specified module could not be found.
What i've tried:
If I use my windows console to activate the conda enviroment and try to import ssl it works
sys.path output in pycharm:
['C:/Users/vlad/Documents/DjangoProjects/cryptodata/playing_around_aiohttp', 'C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\pydev', 'C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\pydev', 'C:\Users\vlad\.PyCharm2017.3\system\cythonExtensions', 'C:\ProgramData\Anaconda2\envs\373\python37.zip', 'C:\ProgramData\Anaconda2\envs\373\DLLs', 'C:\ProgramData\Anaconda2\envs\373\lib', 'C:\ProgramData\Anaconda2\envs\373', 'C:\ProgramData\Anaconda2\envs\373\lib\site-packages', 'C:\Program Files\JetBrains\PyCharm 2017.3.3\helpers\pycharm_matplotlib_backend']
sys.path output in win console:
['', 'C:\ProgramData\Anaconda2\envs\373\python37.zip', 'C:\ProgramData\Anaconda2\envs\373\DLLs', 'C:\ProgramData\Anaconda2\envs\373\lib', 'C:\ProgramData\Anaconda2\envs\373', 'C:\ProgramData\Anaconda2\envs\373\lib\site-packages']
imp.find_module('_ssl') output in pycharm:
(<_io.BufferedReader name='C:\ProgramData\Anaconda2\envs\373\DLLs\_ssl.pyd'>, 'C:\ProgramData\Anaconda2\envs\373\DLLs\_ssl.pyd', ('.pyd', 'rb', 3))
imp.find_module('_ssl') output in windows console:
(<_io.BufferedReader name='C:\ProgramData\Anaconda2\envs\373\DLLs\_ssl.pyd'>, 'C:\ProgramData\Anaconda2\envs\373\DLLs\_ssl.pyd', ('.pyd', 'rb', 3))
In windows console I do "import _ssl" successfuly and then do
_ssl.__file__
the output of that is 'C:\ProgramData\Anaconda2\envs\373\DLLs\_ssl.pyd'
Am I missing something? What's going on here?