question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python 3.7 Mac needs a different way to compile with ssl

See original GitHub issue

I’ve found pythonz can’t build 3.7 with ssl on Mac successfully.

The devguide (https://devguide.python.org/setup/) says:

with Homebrew:

$ brew install openssl xz
and configure python versions >= 3.7:

./configure --with-pydebug --with-openssl=$(brew --prefix openssl)
or configure python versions < 3.7:

$ CPPFLAGS="-I$(brew --prefix openssl)/include" \
  LDFLAGS="-L$(brew --prefix openssl)/lib" \
  ./configure --with-pydebug

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

6reactions
nedbatcommented, Jun 30, 2018

Nice! This worked:

pythonz install 3.7.0 --configure="--with-pydebug --with-openssl=$(brew --prefix openssl)"
1reaction
jpstroopcommented, Jan 4, 2020

In case it helps anyone else: This always gets me, and I finally added a function in my .bash_profile that always adds these args:

function pythonz() {
  EXTRA_INSTALL_FLAGS="--with-pydebug --with-openssl=$(brew --prefix openssl)"
  if [[ "$1" == "install" ]]; then
    shift 1
    command pythonz install $1 --configure="$EXTRA_INSTALL_FLAGS"
  else
    command pythonz "$@"
  fi
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Building Python 3.7.1 - SSL module failed - Stack Overflow
I build newest OpenSSL and LibreSSL from source. OpenSSL path is: "/usr/local/ssl" with version OpenSSL 1.0.2p. ./configure --with-openssl ...
Read more >
Issue 34028: Python 3.7.0 wont compile with SSL Support 1.1 ...
The --with-openssl is no different. I suggest that you install OpenSSL to a local directory and then configure Python to fetch OpenSSL from...
Read more >
Not Able to Build Some Versions of Python on M1 at 12.3.1
I trying to build older version of python such as 3.6, 3.7, 3.8 using pyenv and having build failures. I am on apple...
Read more >
The right and wrong way to set Python 3 as default on a Mac
pyenv install 3.7.3 python-build: use openssl 1.0 from homebrew python-build: use readline from homebrew. Downloading Python-3.7.3.tar.xz.
Read more >
Installing the Python Connector - Snowflake Documentation
Python. Python Package Installer and Setup Tools. Python Packages. pyOpenSSL (macOS only). OpenSSL and FFI (Linux only). Step 1: Install the Connector.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found