Created
April 9, 2018 17:36
-
-
Save hqt/2ffd4b9ef818aa2d760d07c5c5022f56 to your computer and use it in GitHub Desktop.
Setup python environment on 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
| #!/bin/bash | |
| # install python version manager | |
| brew install pyenv | |
| # view all available python versions | |
| pyenv install --list | |
| # select one version and install. i.e: 2.7.14 | |
| pyenv install 2.7.14 | |
| # view all local pythons | |
| pyenv versions | |
| # select python for local version. only for current user | |
| pyenv local 2.7.14 | |
| # select python for global version, for all users | |
| pyenv global 2.7.14 | |
| # tell pyenv to see new installed packages or python version | |
| pyenv rehash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment