realpython / realpython/python-guide

Describing making Python 3 the default `python` under Homebrew

Aberta
#960 2 comentários 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Linguagem predominante
Batchfile
Estrelas
29.8k
Forks
5.9k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Pesquise nos guias de instalação do OS X a seção sobre Homebrew e Python 3 mostrada na issue e, em seguida, leia a página do Homebrew sobre Homebrew e Python para verificar o comportamento atual. Atualize as instruções de Python 3 e Python 2 para refletir o tratamento de PATH e incluir um link para a documentação do Homebrew; considera-se concluído quando a distinção entre as versões do macOS e o comportamento padrão do comando python estiverem corretos.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
documentation
Tipo de issue
Documentação
Dificuldade
2/5
Tempo estimado
1-3 horas
Status de atividade
Estagnada
Clareza
Claramente especificada
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.