Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describing making Python 3 the default python under Homebrew #960

Open
apjanke opened this issue Dec 18, 2018 · 2 comments
Open

Describing making Python 3 the default python under Homebrew #960

apjanke opened this issue Dec 18, 2018 · 2 comments

Comments

@apjanke
Copy link
Contributor

apjanke commented Dec 18, 2018

So, about this section in the OS X installation guides:

screen shot 2018-12-18 at 1 06 38 am

That opt/python/libexec behavior is not actually about 10.12 Sierra vs. newer versions of macOS. Homebrew does not make the unqualified python command be Python 3 on any version of macOS. If this behavior was different in the past, that was due to a different Homebrew version, not a different macOS version. (Homebrew's policy is to not shadow system-provided components in a way that might break things.)

Maybe this section should be updated to something like:

Once you've installed Homebrew, insert the Homebrew directory at the top
of your :envvar:`PATH` environment variable if you are running 10.12 Sierra or older.
You can do this by adding the following line at the bottom of your :file:`~/.profile` file:

.. code-block:: console

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

Now, we can install Python 3:

.. code-block:: console

    $ brew install python

Then, to make your default `python` command point to Python 3:

.. code-block:: console

    export PATH="/usr/local/opt/python/libexec/bin:$PATH"

And the section in the Python 2 installation about doing PATH="/usr/local/opt/python@2/libexec/bin:$PATH" is no longer necessary: the Homebrew python@2 formula now provides a python command that is in /usr/local/bin by default.

Might also want to provide a link to Homebrew's Homebrew and Python page, which goes in to more detail.

@cclauss
Copy link
Contributor

cclauss commented May 29, 2019

Agreed. https://docs.brew.sh/Homebrew-and-Python#python-3x-or-python-2x disagrees with this document on which version on Python will be invoked when python is typed at the macOS command prompt.

@kennethreitz
Copy link
Contributor

this is old information. please send a pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants