Created
October 20, 2021 10:23
-
-
Save xiangyu-sun/f1b4fae79727474d16c52aed181f5d34 to your computer and use it in GitHub Desktop.
m1_pyenv_python_install.sh
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 | |
brew='/usr/local/Homebrew/bin/brew' | |
$brew config | |
echo "Installing Dependencies" | |
$brew install readline | |
$brew install zlib | |
$brew install bzip2 | |
echo "Done!" | |
echo "Installing pyenv" | |
$brew install pyenv | |
echo "Done!" | |
echo | |
echo -e "Setting Environment Variables" | |
export CFLAGS="-I$($brew --prefix openssl)/include -I$($brew --prefix bzip2)/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$($brew --prefix zlib)/lib -L$($brew --prefix bzip2)/lib" | |
echo "Done!" | |
echo | |
echo "Installing Python 3.9.0" | |
/usr/local/Homebrew/Cellar/pyenv/2.1.0/bin/pyenv install 3.9.0 | |
echo "Done!" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment