How To Update Python In Mac



Update

To update python run brew update in the Terminal (this will update Homebrew) and then brew upgrade python3 if a new version of python3 is found by the command brew update at the end you can run brew cleanup python3 to remove every old version with this fancy package manager, you can also take care of R. Both python 2x and 3x can stay installed in a MAC. Mac comes with python 2x version. To check the default python version in your MAC, open the terminal and type-python -version However to check, if you have already installed any of python 3x versions, you need to type. Python3 -version If you don't then go ahead and install it with the installer.

In this article, we will explain “How to Update Python on Mac?”. Updating Python on your MacBook Pro or iMac can be a tedious process. You need knowledge of terminal on macOS which is different from Windows cmd.exe. Here is a detailed article on how to upgrade Python on your mac.

Python is a popular programming language that is widely used by developers. Modern versions of macOS support Python 2.7.x (or Python 2.6.1 in older versions), but many users need to upgrade to Python 3.6 or 3.7.

You may like “macOS Catalina 10.15.5 Installing Problem – Here’s How to Fix It“.

Here are different methods to Update Python on your Mac

One can install Python without using the terminal on MacBook Air or Mac. For this, you need to download the Python installer from the python.org website. Follow the steps below:

  • Visit Python.org and download the latest available Python 3 installer file.
  • Run the downloaded file and install Python 3.x on your macOS.
  • After completing the installation process, Python 3 will be installed.
  • You can see the Python3 folder in /Applications on your Mac. You can also see IDLE in the /Applications.

How To Update Python Version In Mac

How to Install Python with Homebrew

Before proceeding installation with Homebrew, it should be installed on your MacBook Pro. If you don’t have Homebrew on your system, you can download it from here. This script installs Homebrew to /user/local so that you don’t need “sudo” when you brew install.

How To Update Python Version In Mac

To install python via HomeBrew, Follow these steps below:

Run the following command in Terminal:

When Python 3 is installed on your Mac, you can start the program with:

How to Know the Installed Version of Python

Open the Terminal on your macOS by typing terminal in Spotlight Search. Then use the following command:

In most cases, Python 2.7.x will be installed on macOS. After installing Python update, you can check the version with the following command:

Note: Just a reminder, you don’t need to remove Python 2.x or update it from 2.x to 3 in your macOS. You just install the updated version, both versions of Python can coexist without any error. These are the most simple techniques to “How to Update Python on Mac?”.

Update Python Osx

See Also