2

I am trying to install AWS EB-CLI on macOS Mojave 10.14, and encountered following error when compiling Python.

ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?  

BUILD FAILED (OS X 10.14.5 using python-build 20180424)

In the pyenv wiki, it says,

  1. install additional SDK headers – which I did
  2. libssl-dev is required when compiling Python ....

Things I did so far...

  • install OpenSSL via brew
  • sym link above to /user/lib
  • install xz via brew (due to a 'lzma.h' file not found error)

Now the error is:

could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381

I am migrating to Mac from Windows and having a hard time understanding this. Any help would be much appreciated.


Eric solved his problem and posted an answer for this question. I am moving the inquiry he appended to his answer onto his question:

now need to look what was actual culprit? do i really need xz etc. any ideas?

I think he is asking -- as are 39 others on the issue he linked to as of 2020-DEC-18 01:34am UTC -- what the root cause is, and what the solution is?

The issue is still open. Some common themes:

  • fish shell - various issues
  • openssl - not installed? (unlikely)
  • openssl - version 1.0.2o_2 installed; some fixed by installing [email protected]
  • pkg-config - not installed, potentially due to source install instead of homebrew
  • pkg-config - wrong version being pulled from path first.

Some useful comments on the issue:

1 Answer 1

5

Found the answer.

CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl)"

did the trick

more info @ https://github.com/pyenv/pyenv/issues/1184

1
  • You answered your own question and didn't accept it? Bump!
    – SgtPooki
    Dec 19, 2020 at 1:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .