OS X/macOS Python 3

4dalulz

Power Member
Boas,

Tenho o homebrew instalado e por múltiplas vezes já tentei instalar o Python 3, através do comando $ brew install python3, mas sem sucesso. Apesar de aparecer todo o progresso de instalação no terminal, continuo a obter a mensagem:

This version is included in macOS for compatibility with legacy software.

Future versions of macOS will not include Python 2.7.

Instead, it is recommended that you transition to using 'python3' from within Terminal.


Python 2.7.16 (default, Nov 9 2019, 05:55:08)

[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.32.4) (-macos10.15-objc-s on darwin

Type "help", "copyright", "credits" or "license" for more information.

Alguém sabe como solucionar?
Obrigado.
 
O Python 3 não se sobrepõe ao Python 2, coabitam ambos lado-a-lado no sistema. Se quiseres executar Python 3 no terminal precisas mesmo de executar "python3" e não apenas "python"

a6HLb63.png
 
Parece que o teu "python3" está a apontar, erradamente e sabe-se lá porquê, para o comando "/usr/bin/python" do sistema. Provavelmente a forma mais fácil de resolver é reinstalares o "python3" (e se tiveres, o "python2") do Homebrew e esperar que ele faça os apontamentos correctos - "brew uninstall python python3 python@2" e depois "brew install python python3 python@2"
 
Back
Topo