This lab is written specifically for issued macbooks.
- Install the Brew package manager if you don't have it:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Install dependencies:
$ brew install openssl readline sqlite3 xz zlib nano
- If you're running macOS Mojave or higher, you may need to run:
$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
- Run the pyenv install script:
$ curl https://pyenv.run | bash
-
Update your system's "PATH" to include pyenv by editing your bash profile:
nano ~/.bash_profile
- add the below snippet to the bottom of the file:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Close and restart your terminal app to read in new changes!
Run these commands in order to get a better feeling for pyenv
!
-
list available cli options
- $
pyenv
- $
-
list packages / versions available
- $
pyenv install --list
- $
-
list packages / versions available
- $
pyenv install --list | grep "3.8.3"
- $
-
install version 3.8.3
- $
pyenv install -v 3.8.3
- $
-
- list installed versions
- $
pyenv versions
-
- list active version
- $
pyenv version
-
- set new global version
- $
pyenv global 3.8.3