Created
December 3, 2020 09:36
-
-
Save shamilbuzz/f3444d1090b4bd30dc3e360cf2d153fa to your computer and use it in GitHub Desktop.
MacOS Big Sur - Install Python 3.5-dev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install xcode | |
xcode-select --install | |
# Install homebrew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
brew update | |
# Install necessary dependencies | |
brew install openssl readline sqlite3 xz zlib | |
brew install [email protected] | |
export LDFLAGS="-L/usr/local/opt/zlib/lib" | |
export CPPFLAGS="-I/usr/local/opt/zlib/include | |
# Install pyenv | |
brew install pyenv | |
# For upgrading to latest version of pyenv | |
brew upgrade pyenv | |
# Setting important flags | |
set -ex | |
export CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" | |
export LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(xcrun --show-sdk-path)/usr/lib -L/usr/local/opt/zlib/lib" | |
export CPPFLAGS="-I/usr/local/opt/zlib/include" | |
export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig" | |
export SYSTEM_VERSION_COMPAT=1 | |
pyenv install --patch 3.5-dev < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch) | |
# Check avaialble version of python installed | |
pyenv install --list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SKIP respective installation if that is already installed.