Skip to content

Instantly share code, notes, and snippets.

@czuger
Last active June 17, 2024 16:29
Show Gist options
  • Select an option

  • Save czuger/b51bf3d1a36fb360e0c7ecaa4fdb88c7 to your computer and use it in GitHub Desktop.

Select an option

Save czuger/b51bf3d1a36fb360e0c7ecaa4fdb88c7 to your computer and use it in GitHub Desktop.
Python + pyenv for mac
brew install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev
brew install libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev pkg-config liblzma-dev git
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
cd ~/.pyenv && src/configure && make -C src
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
source ~/.zshrc
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
pyenv install 3.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment