mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 23:00:18 +00:00
This commit is contained in:
@@ -63,7 +63,7 @@ line at the bottom of your :file:`~/.profile` file
|
|||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
|
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
|
||||||
|
|
||||||
Now, we can install Python 2.7:
|
Now, we can install Python 2.7:
|
||||||
|
|
||||||
@@ -71,13 +71,11 @@ Now, we can install Python 2.7:
|
|||||||
|
|
||||||
$ brew install python@2
|
$ brew install python@2
|
||||||
|
|
||||||
or Python 3:
|
Because ``python@2`` is a "keg", we need to update our ``PATH`` again, to point at our new installation:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
$ brew install python
|
export PATH="/usr/local/opt/python@2/libexec/bin:$PATH"
|
||||||
|
|
||||||
This will take a minute or two.
|
|
||||||
|
|
||||||
Homebrew names the executable ``python2`` so that you can still run the system Python via the executable ``python``.
|
Homebrew names the executable ``python2`` so that you can still run the system Python via the executable ``python``.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user