Como instalar o Python 3 no macOS

Installing Python 3 isn’t the easiest thing to do on macOS. It’s not exceptionally hard but you need to know what conditions you’re working with. Hopefully, we can take most of the confusion out of the process. Here’s how you can install Python 3 on macOS.

Requirements

This is for macOS Catalina. macOS comes pre-installed with Python but on Catalina, this is version 2.7 which has reached the end of its life. This will create a few hiccups in the process but let’s start with the basics.

First, install Xcode on your Mac. You can get it from the Mac App Store. Once installed, make sure that the app is running. Launch it once to ensure there isn’t a problem.

Next, open Terminal and run the following command. This will install Command Line tools for Xcode. You need these to install Homebrew. The process is short and simple. You only need to follow the on-screen prompts.

xcode-select --install

Finally, run the following command in Terminal to install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Python 3

Now that you’ve installed the basic apps you need, you can install Python 3. Open a new Terminal window, and run the following command.

brew install python3

Como instalar o Python 3 no macOS

The installation won’t take too long but you may need to authenticate with your user password during the installation process. Once it’s complete, you will see a message telling you that Python 3 was installed. Now you need to install pip.

Como instalar o Python 3 no macOS

pip is a package manager for Python. When you install Python scripts or apps, you often see ‘pip’ at the start of the install command. To install pip, run the following command in Terminal.

brew postinstall python3

Como instalar o Python 3 no macOS

This command may, or may not work. If you see the ‘setup.py –no-user-cfg install ‘ message in Terminal, this means that pip did not install. If that’s the case, simply run this command instead and it will install pip.

sudo easy_install pip

Como instalar o Python 3 no macOS

Python 2 vs Python 3

Python 2 is still on your system even though you’ve installed Python 3. In order to send commands to Python 3, you will need to enter python3 in the terminal. If you enter python, the command will be sent to Python 2.

Assuming you’ve now installed Python 3, you can check it by running the following command in Terminal.

python3 --version

Como instalar o Python 3 no macOS

Notice that we entered python3 and not just python. If you enter python –version, you will get a different version number i.e., the Python 2 version. At this point, we don’t recommend removing Python 2 from macOS since there are still a few kinks that Python 3 and pip have on the Mac platform. It is always a good idea to have the old version to fall back on.

Leave a Comment

Como sincronizar duas pastas em um Mac

Como sincronizar duas pastas em um Mac

Imagine a facilidade que seria para sua vida poder sincronizar duas pastas sem precisar classificar manualmente os arquivos dentro delas.

Como trazer a App Store de volta ao iTunes

Como trazer a App Store de volta ao iTunes

Como acessar a App Store no iTunes e instalar aplicativos

Cog: reprodutor de música simples e rápido para Mac

Cog: reprodutor de música simples e rápido para Mac

Você deve ter gostado do poderoso iTunes para reproduzir música no seu Mac, mas como é da natureza humana, às vezes ficamos entediados com a mesma interface do iTunes

Como sincronizar seu telefone Nokia com o Mac facilmente via Bluetooth

Como sincronizar seu telefone Nokia com o Mac facilmente via Bluetooth

Todos os dispositivos Nokia compatíveis com iSync podem se conectar ao seu Mac via Bluetooth. No entanto, alguns modelos de dispositivos Nokia também podem ser sincronizados por meio de um

Baixador do BBC iPlayer

Baixador do BBC iPlayer

O iPlayer Downloader é um pequeno aplicativo bacana que pode baixar arquivos de vídeo (h.264) e áudio (mp3) sem DRM do serviço BBC iPlayer fingindo ser um

Como forçar o encerramento de vários aplicativos na sua área de trabalho

Como forçar o encerramento de vários aplicativos na sua área de trabalho

Como forçar o encerramento de vários aplicativos na sua área de trabalho

O Phone Disk monta o iPhone, iPad e iPod Touch no Finder como uma unidade de disco USB [Mac]

O Phone Disk monta o iPhone, iPad e iPod Touch no Finder como uma unidade de disco USB [Mac]

Os mesmos desenvolvedores por trás do popular iPhone Explorer lançaram outra ferramenta útil chamada Phone Disk para Mac, que pode detectar automaticamente o iPhone,

Cryptor – Criptografe, proteja e proteja qualquer arquivo ou pasta

Cryptor – Criptografe, proteja e proteja qualquer arquivo ou pasta

O Cryptor é um utilitário gratuito para Windows e Mac que foi desenvolvido para criptografar qualquer arquivo rapidamente. Em vez de usar ferramentas que exigem

Obtenha o popular Centro de Controle do iOS no Mac OS X [pago]

Obtenha o popular Centro de Controle do iOS no Mac OS X [pago]

É raro que aplicativos de terceiros reproduzam a funcionalidade do Mac OS X, já que ele pode fazer muito por conta própria. Existem soluções como

Pare automaticamente a reprodução de música do iTunes e desligue o Mac

Pare automaticamente a reprodução de música do iTunes e desligue o Mac

Você é viciado em música e costuma ir para a cama enquanto a música está tocando no iTunes? Você já desejou que a música no seu iTunes não tocasse?