Python has been installed as $(brew -prefix)/bin/python3 Unversioned symlinks `python`, `python-config`, `pip` etc. Pointing to `python3`, `python3-config`, `pip3` etc., respectively, have been installed into.
Today I’d like to announce Homebrew 1.3.0. The most significant change since 1.2.0 is that brew install python no longer installs a python binary without manual PATH additions and instead installs a python2 binary. This avoids overriding the system python binary by default when installing Python as a dependency. With the command brew install python I got the latest version of Python 3 (currently v3.7.0), but I want the last version of Python 3.6 (currently 3.6.5). In today’s blog post I demonstrated how to install OpenCV 3 with Python 2.7 and Python 3 bindings on your macOS system via Homebrew.
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.
Homebrew installs the stuff you need. Homebrew is a package manager for Mac OS
Step 1. Launch Terminal.
Go to Launchpad – Other – Terminal
Step 2. Install HomeBrew
Enter brew command into terminal
brew install python3
Set up PATH environment variable, if you used HomeBrew to install Python3, then HomeBrew already added PATH.
Do not change PATH environment if you can launch python3 from terminal.
Add the following line to your ~/.profile file
Usually your Python installation directory looks like this, add it to your PATH