12/24/2021

Python Install Homebrew

46
  1. Python Install Homebrew Tutorial
  2. Python Install Homebrew Program

Prerequisites for installing Python3 on Mac

Install Xcode

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.

Install Brew

Install

Homebrew installs the stuff you need. Homebrew is a package manager for Mac OS

Step 1. Launch Terminal.

Go to Launchpad – Other – Terminal

Python

Step 2. Install HomeBrew

Install Python3 with Brew

Enter brew command into terminal

InstallPython

brew install python3

Optional, PATH environment

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

Python Install Homebrew Tutorial

export PATH=/usr/local/bin:/usr/local/sbin:$PATH

Usually your Python installation directory looks like this, add it to your PATH

Python Install Homebrew Program

PATH='/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}'

  • Most Viewed News

    • Folx Download Windows
    • Install Docker On Raspberry Pi 3
    • Run Docker Image Locally Windows
    • Install Disk Creator Sierra