AnacondaRecipes / python-feedstock

A conda-smithy repository for python.
BSD 3-Clause "New" or "Revised" License
4 stars 7 forks source link

Latest Python 3.7.1 Windows build does not provide SSL #13

Open kne42 opened 5 years ago

kne42 commented 5 years ago

pip and other packages requiring the SSL module fail on build 3.7.1-he44a216_5 in Windows systems. This was probably introduced in #12 (build 5).

Traceback:

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

XREF:

msarahan commented 5 years ago

Thanks for reporting. I'm not sure what the right fix for this is, as I'm not sure how those various packages use SSL. We'll work on it. You may want to pin to an earlier build of python if this is blocking you.

jjhelmus commented 5 years ago

@kne42 Can you provide any additional information on the environment where this error is occurring? The output of conda list --show-channels would be most helpful. I tried to replicate this by creating an environment using conda create -n py37_latest python=3.7 pip. After activating the environment pip install setuptools-scm worked fine. The stack overflow issue has a number of pip installed packages that likely bundle a conflicting version of openssl which is causing issues.

kne42 commented 5 years ago
$ conda list --show-channel-urls
# packages in environment at C:\Users\ContainerAdministrator\anaconda:
#
# Name                    Version                   Build  Channel
asn1crypto                0.24.0                   py37_0    defaults
ca-certificates           2018.03.07                    0    defaults
certifi                   2018.10.15               py37_0    defaults
cffi                      1.11.5           py37h74b6da3_1    defaults
chardet                   3.0.4                    py37_1    defaults
conda                     4.5.11                   py37_0    defaults
conda-env                 2.6.0                         1    defaults
console_shortcut          0.1.1                         3    defaults
cryptography              2.4.1            py37h7a1dbc1_0    defaults
idna                      2.7                      py37_0    defaults
menuinst                  1.4.14           py37hfa6e2cd_0    defaults
openssl                   1.1.1a               he774522_0    defaults
pip                       10.0.1                   py37_0    defaults
pycosat                   0.6.3            py37hfa6e2cd_0    defaults
pycparser                 2.18                     py37_1    defaults
pyopenssl                 18.0.0                   py37_0    defaults
pysocks                   1.6.8                    py37_0    defaults
python                    3.7.1                he44a216_5    defaults
pywin32                   223              py37hfa6e2cd_1    defaults
requests                  2.19.1                   py37_0    defaults
ruamel_yaml               0.15.46          py37hfa6e2cd_0    defaults
setuptools                40.2.0                   py37_0    defaults
six                       1.11.0                   py37_1    defaults
urllib3                   1.23                     py37_0    defaults
vc                        14.1                 h0510ff6_4    defaults
vs2015_runtime            14.15.26706          h3a45250_0    defaults
wheel                     0.31.1                   py37_0    defaults
win_inet_pton             1.0.1                    py37_1    defaults
wincertstore              0.2                      py37_0    defaults
yaml                      0.1.7                hc54c509_2    defaults
timrichardson commented 5 years ago

After a new installation of 32 bit mini-conda, I immediately ran into this. I pinned per tip on StackOverflow:

The following packages will be DOWNGRADED:
    python: 3.7.1-he44a216_5 --> 3.7.1-h33f27b4_4
#
# Name                    Version                   Build  Channel
asn1crypto                0.24.0                   py37_0    defaults
atomicwrites              1.2.1                    py37_0    defaults
attrs                     18.2.0           py37h28b3542_0    defaults
ca-certificates           2018.03.07                    0    defaults
certifi                   2018.10.15               py37_0    defaults
cffi                      1.11.5           py37h74b6da3_1    defaults
chardet                   3.0.4                    py37_1    defaults
colorama                  0.4.0                    py37_0    defaults
conda                     4.5.11                   py37_0    defaults
conda-env                 2.6.0                         1    defaults
console_shortcut          0.1.1                         3    defaults
cryptography              2.4.1            py37h7a1dbc1_0    defaults
gmail                     0.6.3                     <pip>
idna                      2.7                      py37_0    defaults
menuinst                  1.4.14           py37hfa6e2cd_0    defaults
more-itertools            4.3.0                    py37_0    defaults
openssl                   1.1.1a               he774522_0    defaults
pip                       18.1                     py37_0    defaults
pluggy                    0.8.0                    py37_0    defaults
py                        1.7.0                    py37_0    defaults
pycosat                   0.6.3            py37hfa6e2cd_0    defaults
pycparser                 2.19                     py37_0    defaults
pyodbc                    4.0.24           py37h6538335_0    defaults
pyopenssl                 18.0.0                   py37_0    defaults
pysocks                   1.6.8                    py37_0    defaults
pytest                    4.0.1                    py37_0    defaults
python                    3.7.1                h33f27b4_4    defaults
pywin32                   223              py37hfa6e2cd_1    defaults
requests                  2.20.1                   py37_0    defaults
ruamel_yaml               0.15.46          py37hfa6e2cd_0    defaults
setuptools                40.6.2                   py37_0    defaults
six                       1.11.0                   py37_1    defaults
urllib3                   1.23                     py37_0    defaults
vc                        14.1                 h0510ff6_4    defaults
vs2015_runtime            14.15.26706          h3a45250_0    defaults
wheel                     0.32.3                   py37_0    defaults
win_inet_pton             1.0.1                    py37_1    defaults
wincertstore              0.2                      py37_0    defaults
yaml                      0.1.7                h896c600_2    default
kne42 commented 5 years ago

Installing OpenSSL resolves the issue for me. Seems that the patch removed the SSL library that python is packaged with in favor of using whatever is installed on the user's system.

msarahan commented 5 years ago

This may be related to https://github.com/conda/conda/issues/8145

@jjhelmus has a good idea that things get very complicated when using environments, where the openssl version is different between the root env and the other env. Something isn't as isolated as it should be. Using activation fixes that isolation, seemingly. We're looking into it.