Skip to content

Commit 2d1b231

Browse files
author
cclauss
authored
Changes in how homebrew installs Python on Mac OSX
Homebrew no longer sets pip. See 5 executable names in https://docs.brew.sh/Homebrew-and-Python.html python points to the macOS system Python (with no manual PATH modification) python2 points to Homebrew’s Python 2.7.x (if installed) python3 points to Homebrew’s Python 3.x (if installed) pip2 points to Homebrew’s Python 2.7.x’s pip (if installed) pip3 points to Homebrew’s Python 3.x’s pip (if installed)
1 parent 5249c9c commit 2d1b231

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/starting/install/osx.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ or Python 3:
7777
7878
This will take a minute or two.
7979

80+
Homebrew names the executable ``python2`` so that you can still run the system Python via the executable ``python``.
81+
82+
83+
.. code-block:: console
84+
85+
$ python -V # system Python interpreter
86+
$ python2 -V # Homebrew installed Python 2 interpreter
87+
$ python3 -V # Homebrew installed Python 3 interpreter (if installed)
88+
8089
8190
Setuptools & Pip
8291
----------------
@@ -93,6 +102,12 @@ that is recommended over ``easy_install``. It is superior to ``easy_install``
93102
in `several ways <https://python-packaging-user-guide.readthedocs.io/pip_easy_install/#pip-vs-easy-install>`_,
94103
and is actively maintained.
95104

105+
.. code-block:: console
106+
107+
$ pip2 -V # pip pointing to the Homebrew installed Python 2 interpreter
108+
$ pip3 -V # pip pointing to the Homebrew installed Python 3 interpreter (if installed)
109+
110+
96111
97112
Virtual Environments
98113
--------------------

0 commit comments

Comments
 (0)