Skip to content

Instantly share code, notes, and snippets.

@mtchavez
Last active November 8, 2021 02:48
Show Gist options
  • Save mtchavez/53e32aa38de319a3faf233834456e11a to your computer and use it in GitHub Desktop.
Save mtchavez/53e32aa38de319a3faf233834456e11a to your computer and use it in GitHub Desktop.
Using pyenv to install python on OS X with homebrew dependencies
# 2.7
CFLAGS="-I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include -I/usr/local/opt/zlib/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib -L/usr/local/opt/sqlite/lib -L/usr/local/opt/zlib/lib" \
PYTHON_CONFIGURE_OPTS="--enable-unicode=ucs2" \
pyenv install -v 2.7.12 --force
# 3.x
CFLAGS="-I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib -L/usr/local/opt/sqlite/lib" \
pyenv install -v 3.3.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment