Skip to content

Instantly share code, notes, and snippets.

@sv99
Forked from mtchavez/pyenv-install-osx.sh
Created November 17, 2017 19:17
Show Gist options
  • Save sv99/564a65cafe1aaadcc8430e742ca5febc to your computer and use it in GitHub Desktop.
Save sv99/564a65cafe1aaadcc8430e742ca5febc 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