Last active
October 21, 2022 01:04
-
-
Save villasv/e6f688f3b44f838a2ba7506958df5724 to your computer and use it in GitHub Desktop.
Rosetta Python Setup
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
### x86 | |
# Install Rosetta | |
softwareupdate --install-rosetta | |
# Install Homebrew | |
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
alias brew86="arch -x86_64 /usr/local/bin/brew" | |
# Install Pyenv | |
brew86 install bzip2 gettext openssl readline sqlite3 xz zlib tcl-tk | |
brew86 install pyenv | |
alias pyenv86="arch -x86_64 pyenv" | |
### Python | |
# Ensure the compiler uses the x86 libraries | |
export FLAGS="-I$(brew86 --prefix)/include" | |
export LDFLAGS="-L$(brew86 --prefix)/lib" | |
# Ensure the compiler uses OpenSSL 1.1.x | |
export FLAGS="$FLAGS -I$(brew86 --prefix [email protected])/include" | |
export LDFLAGS="$LDFLAGS -L$(brew86 --prefix [email protected])/lib" | |
# Install Python 3.7 (and any other versions you might want) | |
pyenv86 install -v 3.7.9 | |
### ARM | |
# Install Homebrew | |
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh | |
# Install Pyenv | |
brew install bzip2 gettext openssl readline sqlite3 xz zlib tcl-tk | |
brew install pyenv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment