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 visualizar FPS no macOS

Como visualizar FPS no macOS

Como visualizar FPS no macOS

Blog de backup do Tumblr [Mac]

Blog de backup do Tumblr [Mac]

Marco Arment, o principal desenvolvedor do Tumblr, a popular comunidade de microblogs, lançou um aplicativo para Mac para fazer backup do blog do Tumblr chamado Tumblr Backup

Disk Drill é um software de recuperação de dados totalmente gratuito para Mac

Disk Drill é um software de recuperação de dados totalmente gratuito para Mac

O Disk Drill é um novo aplicativo para Mac que recupera não apenas o seu disco rígido, mas também partições, arquivos danificados, fotos e qualquer tipo de mídia.

Google Maps no Mac Desktop

Google Maps no Mac Desktop

Se você é usuário de Mac, tem muita sorte de ter o serviço Google Maps no desktop. Ao contrário do Google Earth, o Google Maps é um serviço separado.

Catalogue, classifique e organize sua coleção de filmes no Mac

Catalogue, classifique e organize sua coleção de filmes no Mac

Entusiastas da mídia com grandes coleções de filmes certamente apreciarão a organização e os recursos oferecidos pelo DVD Hunter. Ele permite catalogar, classificar e

DiskEject – Forçar a ejeção de CD ou DVD no Mac

DiskEject – Forçar a ejeção de CD ou DVD no Mac

É um problema comum em Macbooks e desktops Mac quando um CD ou DVD não ejeta corretamente. A única solução para corrigir esse problema é reiniciar o computador.

Como adicionar várias imagens a um único PDF no macOS

Como adicionar várias imagens a um único PDF no macOS

Como adicionar várias imagens a um único PDF no macOS

Melhore a gravação de tela do seu jogo no Mac com estas dicas de especialistas

Melhore a gravação de tela do seu jogo no Mac com estas dicas de especialistas

Temos os principais métodos de gravação de tela que usuários de Mac devem conhecer, incluindo aplicativos e ferramentas nativos e as melhores opções de software de gravação de terceiros.

Sincronize músicas com Android, Windows Phone e Blackberry [Mac]

Sincronize músicas com Android, Windows Phone e Blackberry [Mac]

O Instinctiv Music Player, como o nome indica, é um reprodutor de mídia intuitivo do tipo jukebox para gerenciar vários arquivos de mídia no seu Mac. Ele tem um design muito limpo.

Como usar a tela dividida no Mac: multitarefa como um profissional

Como usar a tela dividida no Mac: multitarefa como um profissional

Aprenda a usar a tela dividida no seu Mac. Siga estes passos simples para ativar a Visualização Dividida e otimizar sua multitarefa.