Prerequisites for installing Python3 on Mac Install Xcode Xcode is Apple's Integrated Development Environment (IDE). You might already have Xcode on your Mac. If not, you can get Xcode from Apple appstore.python
Xcode Install Brew Homebrew installs the stuff you need. Homebrew is a package manager for Mac OSgit
Step 1. Launch Terminal.github
Go to Launchpad – Other – Terminalruby
Step 2. Install HomeBrewapp
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"curl
Install Python3 with Brew Enter brew command into terminalui
brew install python3 Optional, PATH environment Set up PATH environment variable, if you used HomeBrew to install Python3, then HomeBrew already added PATH.this
Do not change PATH environment if you can launch python3 from terminal.url
Add the following line to your ~/.profile filecode
export PATH=/usr/local/bin:/usr/local/sbin:$PATH Usually your Python installation directory looks like this, add it to your PATH
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"