Intel® Distribution for Python*
Engage in discussions with community peers related to Python* applications and core computational packages.

pip install XXX; SSL dependency in Win10

Mingliang_B_Intel
7,564 Views

Hi Expert,

I got the following error while trying to install any 3rd party module from PYPI.

pip install XXX

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

 

Could not fetch URL https://pypi.python.org/simple/pyvisa/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping

0 Kudos
10 Replies
Rohit_J_Intel
Employee
7,564 Views

Hi Mingliang,

We build CPython with OpenSSL support, hence it is strange that pip complains about SSL/TLS support being absent. Please run the following commands and paste its output here: 

  1. where pip
  2. <path_to_Intel_Distribution_for_Python>\Scripts\conda.exe list
  3. <path_to_Intel_Distribution_for_Python>\python.exe -c "import ssl; import _ssl; print(ssl.OPENSSL_VERSION)"

As we continue investigating this, I can suggest a temporary workaround that you could use to circumvent this issue. You can try to fetch pyvisa using one of the following commands:

1. <path_to_Intel_Distribution_for_Python>\Scripts\pip.exe install --index-url=http://pypi.python.org/simple/ pyvisa
OR
2. <path_to_Intel_Distribution_for_Python>\Scripts\pip.exe install --trusted-host pypi.python.org pyvisa

Thanks,
Rohit

0 Kudos
Mingliang_B_Intel
7,564 Views

Hello Rohit,

Still not work. I have tried IntelPython3 and miniconda. Both said SSL unavailable in Python.

And I don't have CPython or OpenSSL  ...

C:\IntelPython3\Scripts>pip.exe install --index-url=https://pypi.python.org/simple/ pyvisa
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pyvisa
  Could not fetch URL https://pypi.python.org/simple/pyvisa/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
  Could not find a version that satisfies the requirement pyvisa (from versions: )
No matching distribution found for pyvisa

0 Kudos
Mingliang_B_Intel
7,564 Views

C:\IntelPython3\Scripts>where pip
C:\IntelPython3\Scripts\pip.exe

C:\IntelPython3\Scripts>conda.exe list
# packages in environment at C:\IntelPython3:
#
backports                 1.0                py35_intel_6  [intel]  intel
bleach                    1.5.0              py35_intel_0  [intel]  intel
bzip2                     1.0.6             vc14_intel_10  [intel vc14]  intel
cffi                      1.9.1              py35_intel_1  [intel]  intel
colorama                  0.3.7              py35_intel_5  [intel]  intel
conda                     4.3.16             py35_intel_1  [intel]  intel
conda-env                 2.6.0                         0    intel
cryptography              1.7.1              py35_intel_0  [intel]  intel
cycler                    0.10.0             py35_intel_5  [intel]  intel
cython                    0.25.2             py35_intel_4  [intel]  intel
decorator                 4.0.11             py35_intel_0  [intel]  intel
distarray                 0.6.0              py35_intel_4  [intel]  intel
entrypoints               0.2.2              py35_intel_2  [intel]  intel
get_terminal_size         1.0.0              py35_intel_5  [intel]  intel
hdf5                      1.8.17             vc14_intel_8  [intel vc14]  intel
html5lib                  0.999              py35_intel_0  [intel]  intel
icc_rt                    16.0.3                  intel_6  [intel]  intel
idna                      2.2                py35_intel_0  [intel]  intel
impi_rt                   2017.0.3                intel_2  [intel]  intel
intelpython               2017.0.3                      4    intel
ipykernel                 4.5.0              py35_intel_9  [intel]  intel
ipyparallel               6.0.2              py35_intel_0  [intel]  intel
ipython                   5.3.0              py35_intel_0  [intel]  intel
ipython_genutils          0.2.0              py35_intel_0  [intel]  intel
ipywidgets                6.0.0              py35_intel_0  [intel]  intel
jinja2                    2.9.5              py35_intel_3  [intel]  intel
jsonschema                2.5.1              py35_intel_5  [intel]  intel
jupyter                   1.0.0              py35_intel_5  [intel]  intel
jupyter_client            5.0.0              py35_intel_1  [intel]  intel
jupyter_console           5.1.0              py35_intel_0  [intel]  intel
jupyter_core              4.3.0              py35_intel_0  [intel]  intel
libpng                    1.6.28            vc14_intel_10  [intel vc14]  intel
llvmlite                  0.17.0             py35_intel_2  [intel]  intel
markupsafe                0.23               py35_intel_6  [intel]  intel
matplotlib                2.0.0              py35_intel_0  [intel]  intel
menuinst                  1.4.1              py35_intel_4  [intel]  intel
mistune                   0.7.4              py35_intel_0  [intel]  intel
mkl                       2017.0.3                intel_5  [intel]  intel
mpi4py                    2.0.0             py35_intel_14  [intel]  intel
mpmath                    0.19               py35_intel_5  [intel]  intel
nbconvert                 5.1.1              py35_intel_0  [intel]  intel
nbformat                  4.3.0              py35_intel_0  [intel]  intel
nose                      1.3.7             py35_intel_12  [intel]  intel
notebook                  5.0.0              py35_intel_0  [intel]  intel
numba                     0.32.0            py35_intel_14  [intel]  intel
numexpr                   2.6.2           np111py35_intel_1  [intel]  intel
numpy                     1.11.3             py35_intel_6  [intel]  intel
openmp                    2017.0.3                intel_4    intel
openssl                   1.0.2k             vc14_intel_3  [intel vc14]  intel
pandas                    0.19.2             py35_intel_4  [intel]  intel
pandocfilters             1.4.1              py35_intel_0  [intel]  intel
path.py                   10.1               py35_intel_0  [intel]  intel
pickleshare               0.7.4              py35_intel_1  [intel]  intel
pip                       9.0.1              py35_intel_0  [intel]  intel
prompt_toolkit            1.0.14             py35_intel_0  [intel]  intel
pyasn1                    0.2.3              py35_intel_0  [intel]  intel
pycosat                   0.6.2              py35_intel_1  [intel]  intel
pycparser                 2.17               py35_intel_0  [intel]  intel
pydaal                    2017.0.3.20170414    py35_intel_3  [intel]  intel
pygments                  2.2.0              py35_intel_0  [intel]  intel
pyopenssl                 16.2.0             py35_intel_0  [intel]  intel
pyparsing                 2.1.4              py35_intel_5  [intel]  intel
pytables                  3.3.0              py35_intel_1  [intel]  intel
python                    3.5.3                   intel_1  [intel]  intel
python-dateutil           2.6.0              py35_intel_0  [intel]  intel
pytz                      2017.2             py35_intel_0  [intel]  intel
pyyaml                    3.12               py35_intel_1  [intel]  intel
pyzmq                     16.0.2             py35_intel_2  [intel]  intel
requests                  2.13.0             py35_intel_0  [intel]  intel
ruamel_yaml               0.11.14            py35_intel_1  [intel]  intel
scikit-learn              0.18.1             py35_intel_6  [intel]  intel
scipy                     0.18.1          np111py35_intel_13  [intel]  intel
setuptools                27.2.0             py35_intel_0  [intel]  intel
simplegeneric             0.8.1              py35_intel_5  [intel]  intel
six                       1.10.0             py35_intel_7  [intel]  intel
sqlite                    3.13.0                 intel_14  [intel vc14]  intel
sympy                     1.0                py35_intel_5  [intel]  intel
tbb                       2017.0.6           py35_intel_3  [intel]  intel
tcl                       8.6.4             vc14_intel_16  [intel vc14]  intel
testpath                  0.3                py35_intel_0  [intel]  intel
tk                        8.6.4             vc14_intel_26  [intel vc14]  intel
tornado                   4.4.2              py35_intel_0  [intel]  intel
traitlets                 4.3.2              py35_intel_0  [intel]  intel
vc                        14.0                          1    intel
vs2015_runtime            14.0.25123              intel_3  [intel]  intel
wcwidth                   0.1.7              py35_intel_5  [intel]  intel
wheel                     0.29.0             py35_intel_5  [intel]  intel
widgetsnbextension        2.0.0                    py35_0    intel
win_unicode_console       0.5                py35_intel_0  [intel]  intel
xz                        5.2.2             vc14_intel_15  [intel vc14]  intel
zlib                      1.2.11             vc14_intel_2  [intel vc14]  intel

C:\IntelPython3\Scripts>cd ..

C:\IntelPython3>python.exe -c "import ssl; import _ssl; print(ssl.OPENSSL_VERSION)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\IntelPython3\lib\ssl.py", line 99, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: DLL load failed: The operating system cannot run %1.

0 Kudos
Rohit_J_Intel
Employee
7,564 Views

pip was unusable with both IDP and Miniconda on Windows. The problem was root-caused to a conflicting library (libeay32.dll) that was installed in system path. At run-time, loading of this library gained precedence over what we ship with our distribution. There was a version conflict and the execution would fail with "ImportError: DLL load failed: The operating system cannot run %1.". Removing this extraneous library from system path resolved the issue.

0 Kudos
mostert__cornelius
7,564 Views

Hi there

I have the same problem, but your solution sounds a bit unclear. Could you please clearly specify how you got around this problem.

Currently I have resolved to download the Wheels but when trying to install the wheel, it is trying to get it's dependency and again... SSL

 

 

thanx A LOT

0 Kudos
Hendy_Irawan
Beginner
7,564 Views

Rohit J. (Intel) wrote:

pip was unusable with both IDP and Miniconda on Windows. The problem was root-caused to a conflicting library (libeay32.dll) that was installed in system path. At run-time, loading of this library gained precedence over what we ship with our distribution. There was a version conflict and the execution would fail with "ImportError: DLL load failed: The operating system cannot run %1.". Removing this extraneous library from system path resolved the issue.

Thanks Rohit.  There are some people getting this problem inside venv (see https://github.com/pypa/virtualenv/issues/1139). ;I got issue using Intel Python Distribution *and* `python -m venv` to create my venv. It seems to be an issue with `ssl` module, having nothing to do with `pip`:

```
(venv) C:\Users\ceefour\git\tews\ecn-svc>python
Python 3.6.3 |Anaconda custom (64-bit)| (default, May  3 2018, 23:39:44) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Intel(R) Distribution for Python is brought to you by Intel Corporation.
>>> import ssl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\lib\ssl.py", line 101, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: DLL load failed: The operating system cannot run %1.
>>>
```
 
Note that the bug only triggered when using Intel Python inside a venv. When using the base env, it works:
 
```
(base) C:\Users\ceefour>python
Python 3.6.3 |Anaconda custom (64-bit)| (default, May  3 2018, 23:39:44) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Intel(R) Distribution for Python is brought to you by Intel Corporation.
>>> import ssl
>>> 
```
 
I have _lots_ of `libeay32.dll` inside of `C:\Program Files`, including one in `C:\ProgramData\Anaconda3\Library\bin`
 
I have tried moving `C:\ProgramData\Anaconda3\Library\bin` to front of `PATH`, but still error happens.
0 Kudos
kim__me_ae
Beginner
7,563 Views
Rohit J. (Intel) wrote:

 

pip was unusable with both IDP and Miniconda on Windows. The problem was root-caused to a conflicting library (libeay32.dll) that was installed in system path. At run-time, loading of this library gained precedence over what we ship with our distribution. There was a version conflict and the execution would fail with "ImportError: DLL load failed: The operating system cannot run %1.". Removing this extraneous library from system path resolved the issue.

I can solve this problem by adding dir path of intel-python which has libeay32.dll (in my case C:\Devs\IntelPython3\pkgs\openssl-1.0.2l-vc14_intel_0\Library\bin) in system environment as top most position. 

 

0 Kudos
kim__me_ae
Beginner
7,563 Views
I can solve this problem by adding dir path of intel-python which has libeay32.dll (in my case ..\IntelPython3\pkgs\openssl-1.0.2l-vc14_intel_0\Library\bin) in system environment as top most position.
0 Kudos
Subham_S_Intel
Employee
7,563 Views

Try using

pip3 install <Module>

It worked out for me. I was getting the same error using pip install while installing Django.

using pip3 install Django it worked

0 Kudos
JSixp
Beginner
7,563 Views

Happening again on the latest release.

0 Kudos
Reply