Homebrew Python3

Question or problem about Python programming:

How can I install a previous version of Python 3 in macOS using brew?

Tldr; install brew; brew install python Homebrew is a great installer for Mac and its main job is to make it easier to install packages. Step 1: Download Homebrew here 'brew' hosts its package information here as “formulae“. Ensurepip fails during homebrew python3.4 installation - python3.4 installation with homebrew. The right and wrong way to set up Python 3 on MacOS, Homebrew is so wonderful, it even offers a different formula for Python 2: # If you need Homebrew's Python 2.7 run $ brew install [email protected] Installing Python 2.7 with Homebrew For Mac 10.8.x 1) Install XCode 4.4. Get it from the App Store. 2) Install Command Line Tools.

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).

I have read about another package pyenv that can assist in handle different python installation, but this solution is not suitable for me.

How to solve the problem:

Solution 1:

Short Answer

To make a clean install of Python 3.6.5 use:

If you prefer to recover a previously installed version, then:

Long Answer

There are two formulas for installing Python with Homebrew: [email protected] and python.
The first is for Python 2 and the second for Python 3.

Note: You can find outdated answers on the web where it is mentioned python3 as the formula name for installing Python version 3. Now it’s just python!

By default, with these formulas you can install the latest version of the corresponding major version of Python. So, you cannot directly install a minor version like 3.6.

Solution

With brew, you can install a package using the address of the formula, for example in a git repository.

Or specifically for Python 3

The address you must specify is the address to the last commit of the formula (python.rb) for the desired version.
You can find the commint identifier by looking at the history for homebrew-core/Formula/python.rb

Python > 3.6.5

In the link above you will not find a formula for a version of Python above 3.6.5.
After the maintainers of that (official) repository released Python 3.7, they only submit updates to the recipe of Python 3.7.

As explained above, with homebrew you have only Python 2 ([email protected]) and Python 3 (python), there is no explicit formula for Python 3.6.

Although those minor updates are mostly irrelevant in most cases and for most users, I will search if someone has done an explicit formula for 3.6.

Solution 2:

As an update, when doing

You may encounter

To bypass it, add the --ignore-dependencies argument to brew install.

Solution 3:

What I did was first I installed python 3.7

then I installed python 3.6.5 using above link

After that I ran brew link --overwrite python. Now I have all pythons in the system to create the virtual environments.

To create Python 3.7 virtual environment.

To create Python 3.6 virtual environment

Solution 4:

I have tried everything but could not make it work. Finally I have used pyenv and it worked directly like a charm.

So having homebrew installed, juste do:

to manage virtualenvs:

See pyenv and pyenv-virtualenv for more info.

EDIT (2019/03/19)

I have found using the pyenv-installer easier than homebrew to install pyenv and pyenv-virtualenv direclty:

To manage python version, either globally:

or locally in a given directory:

Solution 5:

I tried all the answers above to install Python 3.4.4. The installation of python worked, but PIP would not be installed and nothing I could do to make it work. I was using Mac OSX Mojave, which cause some issues with zlib, openssl.

What not to do:

  • Try to avoid using Homebrew for previous version given by the formula Python or Python3.
  • Do not try to compile Python

Solution:

  1. Download the macOS 64-bit installer or macOS 64-bit/32-bit installer: https://www.python.org/downloads/release/python-365/
  2. In previous step, it will download Python 3.6.5, if for example, you want to download Python 3.4.4, replace in the url above python-365 by python-344
  3. Download click on the file you downloaded a GUI installer will open
  4. If you downloaded python-365, after installation, to launch this version of python, you will type in your terminal python365, same thing for pip, it will be pip365

p.s: You don’t have to uninstall your other version of Python on your system.

Edit:

I found a much much much better solution that work on MacOSX, Windows, Linux, etc.

  1. It doesn’t matter if you have already python installed or not.
  2. Download Anaconda
  3. Once installed, in terminal type: conda init
  4. In terminal,create virtual environment with any python version, for example, I picked 3.4.4: conda create -n [NameOfYour VirtualEnvironment] python=3.4.4
  5. Then, in terminal, you can check all the virtual environment you ahave created with the command: conda info --envs
  6. Then, in terminal, activate the virtual environment of your choice with: conda activate [The name of your virtual environment that was shown with the command at step 5]

Homebrew Python 3.7

Hope this helps!

Latest version

Released:

Homebrew wrapper

Project description

Homebrew wrapper

  • Free software: ISC license
  • Documentation: https://homebrew-wrapper.readthedocs.org.

Features

  • Get overview of homebrew package dependencies

Release historyRelease notifications RSS feed

0.2.3

0.2.2

0.2.1

0.2.0

0.1.14

0.1.13

0.1.12

0.1.11

0.1.10

0.1.9

0.1.8

0.1.7

0.1.6

0.1.5

0.1.4

0.1.3

0.1.2

0.1.1

0.0.35

0.0.34

0.0.33

0.0.32

0.0.31

0.0.30

0.0.29

0.0.28

0.0.27

0.0.26

0.0.25

0.0.24

0.0.23

0.0.22

0.0.20

0.0.19

0.0.18

0.0.17

0.0.16

0.0.15

0.0.14

0.0.13

0.0.12

0.0.11

0.0.10

0.0.9

0.0.8

0.0.7

0.0.6

0.0.5

SMART Learning Suite is available through a simple subscription model that is tailored to you, so you have only one cost to budget for. Learn more about SMART Learning Suite. Both the SMART Notebook® desktop and SMART Learning Suite Online experience. SMART Board Pro. SMART Board MX Pro series SMART Board 7000R Pro series SMART Board. Black and Red Replacement Pen for Interactive SMART Boards SPNL-6000 Series and SBID8000-G5 Series. Choose options $49.00 SMART Board 500/600 Series Replacement Pens and Eraser - Set of Four SMART. Smart boards have been integrated into classrooms for years, but how much do they cost? Click here to learn about and compare smart board prices. Generally speaking, you should be budgeting between $2000.00 and $6000.00. Smartboard Top 10 Smart Boards. Your Selection: Categories. Top 10 Smart Boards; Clear All. Price Range $1071 - $2117 (1) $2117 and up (7) Screen Size 2 IN - 35 IN (1) 56 IN - 70 IN (1) 71 IN. Boards

0.0.4

0.0.3

0.0.2

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for homebrew, version 0.2.3
Filename, sizeFile typePython versionUpload dateHashes
Filename, size homebrew-0.2.3-py3-none-any.whl (4.8 kB) File type Wheel Python version py3 Upload dateHashes
Filename, size homebrew-0.2.3.tar.gz (3.8 kB) File type Source Python version None Upload dateHashes
Close

Homebrew Python3

Default

Hashes for homebrew-0.2.3-py3-none-any.whl

Hashes for homebrew-0.2.3-py3-none-any.whl
AlgorithmHash digest
SHA256195fcae660ffe16c6f3a37232b87d7e21104866344e0fcd23bc7bb5c2d01e135
MD5d829ace6dc2eeb49fc1cf1fac60fb488
BLAKE2-256fd15b5fba48bcbadfbcd5e30738d087a4537914c91404ffe97c13144180a3ec7
Close

Hashes for homebrew-0.2.3.tar.gz

Hashes for homebrew-0.2.3.tar.gz
AlgorithmHash digest
SHA256024c21bcd7dd60db15991b1361728c53bf08fc37b2ee51f60cc2a5306b8366cc
MD541a098b2bc164e879ffff89b1f57398a
BLAKE2-256d63e86bd02f3a6af7d78024b818b6e66e1ee189fa56d4bb530a764f4b08ce97e