Come installare Python 3 su macOS

Installare Python 3 non è la cosa più semplice da fare su macOS. Non è particolarmente difficile, ma devi sapere in quali condizioni stai lavorando. Speriamo di poter eliminare la maggior parte della confusione dal processo. Ecco come puoi installare Python 3 su macOS.

Requisiti

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

Come installare Python 3 su 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.

Come installare Python 3 su 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

Come installare Python 3 su 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

Come installare Python 3 su 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

Come installare Python 3 su 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

Come ripristinare lApp Store su iTunes

Come ripristinare lApp Store su iTunes

Come ottenere l'App Store in iTunes e installare le app

Cog: lettore musicale semplice e veloce per Mac

Cog: lettore musicale semplice e veloce per Mac

Probabilmente ti è piaciuto il potente iTunes per riprodurre musica sul tuo Mac, ma come è nella natura umana a volte ci si annoia della solita interfaccia di iTunes

Come sincronizzare facilmente il tuo telefono Nokia con il Mac tramite Bluetooth

Come sincronizzare facilmente il tuo telefono Nokia con il Mac tramite Bluetooth

Tutti i dispositivi Nokia supportati da iSync possono connettersi al tuo Mac tramite Bluetooth. Tuttavia, alcuni modelli di dispositivi Nokia possono anche essere sincronizzati tramite un

Scaricatore BBC iPlayer

Scaricatore BBC iPlayer

iPlayer Downloader è una piccola applicazione ingegnosa che può scaricare file video (h.264) e audio (mp3) senza DRM dal servizio BBC iPlayer fingendo di essere un

Come forzare la chiusura di più app sul desktop

Come forzare la chiusura di più app sul desktop

Come forzare la chiusura di più app sul desktop

Phone Disk monta iPhone, iPad, iPod Touch nel Finder come unità disco USB [Mac]

Phone Disk monta iPhone, iPad, iPod Touch nel Finder come unità disco USB [Mac]

Gli stessi sviluppatori del famoso iPhone Explorer hanno lanciato un altro utile strumento chiamato Phone Disk per Mac, che può rilevare automaticamente iPhone,

Cryptor: crittografa, metti in sicurezza e proteggi qualsiasi file o cartella

Cryptor: crittografa, metti in sicurezza e proteggi qualsiasi file o cartella

Cryptor è un'utilità gratuita per Windows e Mac sviluppata per crittografare rapidamente qualsiasi file al volo. Invece di utilizzare strumenti che richiedono

Ottieni il famoso Centro di controllo iOS su Mac OS X [a pagamento]

Ottieni il famoso Centro di controllo iOS su Mac OS X [a pagamento]

È raro che le app di terze parti replichino le funzionalità di Mac OS X, poiché c'è così tanto che può fare da solo. Esistono soluzioni come

Interrompere automaticamente la riproduzione di musica da iTunes e spegnere il Mac

Interrompere automaticamente la riproduzione di musica da iTunes e spegnere il Mac

Sei un appassionato di musica che di solito va a letto mentre ascolta la musica su iTunes? Hai mai desiderato che la musica sul tuo iTunes...

Batch Touch – Modifica la data di creazione/modifica di file e cartelle

Batch Touch – Modifica la data di creazione/modifica di file e cartelle

In molte situazioni è necessario modificare la data di creazione o modifica di un file o di una cartella specifici. Ciò è auspicabile soprattutto se si invia