Last active
June 17, 2024 16:29
-
-
Save czuger/b51bf3d1a36fb360e0c7ecaa4fdb88c7 to your computer and use it in GitHub Desktop.
Python + pyenv for mac
This file contains hidden or 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
| 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