Skip to content

Instantly share code, notes, and snippets.

@jpclipffel
Created November 19, 2019 12:44
Show Gist options
  • Save jpclipffel/845787627e23f76e542c69f736106c10 to your computer and use it in GitHub Desktop.
Save jpclipffel/845787627e23f76e542c69f736106c10 to your computer and use it in GitHub Desktop.
Python and Brew on MacOS Catalina

Python and Brew on MacOS Catalina

Installation

  • Install Brew's OpenSSL: brew install openssl
  • Install Brew's Python3: brew install python3

Configure

Add the following configuration to a ~/.bashrc or ~/.zshrc:

# Python alises (replace 3.7.5 with current version)
alias python3.7="$(brew --prefix)/Cellar/python/3.7.5/bin/python3"
alias python3="python3.7"
alias python="python3.7"

# Force Brew's OpenSSL version
export DYLD_LIBRARY_PATH=/usr/local/opt/openssl/lib:$DYLD_LIBRARY_PATH

# Other Python aliases (optional)
# Python - PIP
alias pip3.7="python3.7 -m pip"
alias pip3="pip3.7"
alias pip="pip3.7"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment