Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update python 3.6 to 3.7 using Mac terminal

OK I was afraid to use the terminal, so I installed the python-3.7.2-macosx10.9 package downloaded from python.org Ran the certificate and shell profile scripts, everything seems fine. Now the "which python3" has changed the path from 3.6 to the new 3.7.2

So everything seems fine, correct?

My question (of 2) is what's going on with the old python3.6 folder still in the applications folder. Can you just delete it safely? Why when you install a new version does it not at least ask you if you want to update or install and keep both versions?

Second question, how would you do this from the terminal? I see the first step is to sudo to the root. I've forgotten the rest. But from the terminal, would this simply add the new version and leave the older one like the package installer? It's pretty simple to use the package installer and then delete a folder.

So, thanks in advance. I'm new to python and have not much confidence using the terminal and all the powerful shell commands.

And yeah I see all the Brew enthusiasts. I DON'T want to use Brew for the moment.

The python snakes nest of pathways is a little confusing, for the moment. I don't want to get lost with a zillion pathways from Brew because it's confusing for the moment.

I love Brew, leave me alone.

like image 285
stoney Avatar asked Mar 06 '19 00:03

stoney


People also ask

How do I update existing Python on Mac?

Update Python Using Python Installer for macOS We can download the installer and update or install the desired version using the Python installer. We can confirm if the new version of Python is successfully installed or not by checking the Python version using the same above two commands.

Can you update python from the terminal?

All you have to do is visit the Python downloads page and download the latest version. Clicking on the button will replace the existing version of Python with the new version. The older version will be removed from your computer. After you restart the computer, the new patch will be installed on your machine.


1 Answers

Yes, you can install Python 3.7 or Python 3.8 using installer that you can download from python.org. It doesn't automatically delete the older version that you can keep using the older version.

For example, if you have python3.7 and python3.8, you can run either one on your terminal.

On the other hand, it is quite easy to install using Homebrew, you can follow the instructions on this article on how to install Python3 on MacOS

like image 195
Jun711 Avatar answered Oct 20 '22 10:10

Jun711