Skip to content

Instantly share code, notes, and snippets.

@tealtail
Forked from mtchavez/pyenv-install-osx.sh
Created October 18, 2018 16:14
Show Gist options
  • Save tealtail/9a290da75d35b66802b8783c8ddd2d07 to your computer and use it in GitHub Desktop.
Save tealtail/9a290da75d35b66802b8783c8ddd2d07 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