Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pyenv install python versions on big sur
export MACOSX_DEPLOYMENT_TARGET=11.0
brew install pyenv bzip2 zlib xz openssl@1.1
## 3.6.8
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.6.8 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)
## 3.6.12
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.6.12 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)
## 3.7.9
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install 3.7.9
@andrewcrook
Copy link

andrewcrook commented Jun 25, 2021

Sadly not working for 3.7.3

if you can fine one that works in 3.7.x where x >= 3 it's unlucky anything will break as they’re are minor updates.

@taegyunkim
Copy link

taegyunkim commented Sep 17, 2021

Thank you, 3.6.12 command worked like a charm.

@in03
Copy link

in03 commented Apr 11, 2022

I keep getting this error installing 3.6.8 as above. Anyone have some insight?
Oddly enough it looks like it keeps going.
Running Big Sur on Mac Mini M1.

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

Inspect or clean up the working tree at /var/folders/lk/zvz8b1mj75xcs2_vz6ln9wz40000gn/T/python-build.20220411160332.92993
Results logged to /var/folders/lk/zvz8b1mj75xcs2_vz6ln9wz40000gn/T/python-build.20220411160332.92993.log

Last 10 log lines:
         install|*) ensurepip="" ;; \
      esac; \
       ./python.exe -E -m ensurepip \
         $ensurepip --root=/ ; \
   fi
Looking in links: /var/folders/lk/zvz8b1mj75xcs2_vz6ln9wz40000gn/T/tmptxti00w0
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-18.1 setuptools-40.6.2

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