Fixing openssl/ssl dependency for python 3.5.0

Yesterday I spent couple of hours on how to fix the following error: import _ssl # if we can't import it, let the error propagate ModuleNotFoundError: No module named '_ssl' The error popped up during the setup process of a docker container for CI pipeline which should test a python cli tool with tox. The problem could easily be rooted to a openssl library dependency. I also tried the setup with pyenv which is an easy python environment tool but with this approach the same errors occurred. As I was already quite familiar with spack I thought how that it might be possible to fix it the ssl problem with this tool. But in the beginning it also didn’t worked out. On github you find a long issue in the pyenv repo which describes on how to setup the different CFLAGS and LDFLAGS. There I also found a good tip from Robby Dyer who wrote that if you have python version less than 3.5.2 it needs openssl 1.0. ...

May 14, 2020 Â· 2 min Â· Moritz Gnisia