Skip to content

Instantly share code, notes, and snippets.

@r0nny8000
Last active January 25, 2022 20:04
Show Gist options
  • Save r0nny8000/02c98e56719e326a56ef908dc52a9de4 to your computer and use it in GitHub Desktop.
Save r0nny8000/02c98e56719e326a56ef908dc52a9de4 to your computer and use it in GitHub Desktop.
Install Python 3.6.12 on Big Sure

compiler settings

set -x LDFLAGS "-L/usr/local/opt/zlib/lib -L/usr/local/opt/bzip2/lib -L/usr/local/opt/sqlite/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
set -x CFLAGS "-I/usr/local/opt/zlib/include -I/usr/local/opt/bzip2/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/readline/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
set -x CPPFLAGS "-I/usr/local/opt/zlib/include -I/usr/local/opt/sqlite/include"
set -x PKG_CONFIG_PATH "/usr/local/opt/zlib/lib/pkgconfig /usr/local/opt/sqlite/lib/pkgconfig"

homebrew and xcode installed

zsh
pyenv install --patch --force  3.6.12 <<(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.6.12.tar.xz...
-> https://www.python.org/ftp/python/3.6.12/Python-3.6.12.tar.xz
Installing Python-3.6.12...
patching file Misc/NEWS.d/next/macOS/2020-06-24-13-51-57.bpo-41100.mcHdc5.rst
patching file configure
Hunk #1 succeeded at 3375 (offset -51 lines).
patching file configure.ac
Hunk #1 succeeded at 495 (offset -15 lines).
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.6.12 to /Users/andre/.pyenv/versions/3.6.12

pyenv versions
* system (set by /Users/andre/.pyenv/version)
  3.6.12
  3.7.10
@HumanRupert
Copy link

Made. My. Day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment