Learn how to upgrade Python 3.6 to Python 3.7 on Mac OS.

This post has been updated on How to Update Python 3.6 to Python 3.8 on Mac OS. This post will be removed end of this month.

Set up PATH environment variable, if you used HomeBrew to install Python3, then HomeBrew already added PATH. Do not change PATH environment if you can launch python3 from terminal. Add the following line to your /.profile file. If you use Homebrew, you can run brew install command to update Python to Python 3.7. Brew install python3 Verification. After you install, python3 command will point to Python 3.7. You can verify by using commands below. Python3 -version # Python 3.7.4 You can use which command to find out the location of Python 3.7. Link to Installing the latest version of Python on Mac OS Catalina and overriding the old default pre-installed version podcast on anchorfm I finally did it. I successfully installed Python version 3.7.7 via Homebrew on my Mac laptop with OS Catalina installed. By the way, if you're wondering why I keep referring to Python 3.x – the x is a stand-in for sub-versions (or point releases as developers call them.) This means any version of Python 3. How to Install Homebrew on Mac. First you need to install Homebrew, a powerful package manager for Mac. Open up your terminal.

Python Official Site

1) Open up Python official download site. It looks something like the image below. Press Download Python 3.7.4 or the version you would like to download.

2) Use the download installer to install Python 3.7. You can refer to How to Install Python3 article for more information.

Homebrew

If you use Homebrew, you can run brew install command to update Python to Python 3.7

Verification

After you install, python3 command will point to Python 3.7. You can verify by using commands below.

You can use which command to find out the location of Python 3.7

Note

You can check out How to Install Pip article to learn how to install Pip.

Support Jun

Thank you for reading!

If you are preparing for Software Engineer interviews, I suggest Elements of Programming Interviews in Java for algorithm practice. Good luck!

You can also support me by following me on Medium or Twitter.

Feel free to contact me if you have any questions.

Python is very popular programming and scripting language. It provides useful modules and libraries but also there is a lot of popular 3rd party library. Pip is the command and tools used to install, update and remove 3rd party packages. In this tutorial, we will learn how to install pip and some useful information.

Check and Display Python Version

Update python mac brew 2019Update python mac brew 2020

Update Python Version Mac Brew

Before installing the pip we have to be sure that Python is installed. Also, the version of the Python is important because pip will be installed according to this Python version.

We can see that both PYthon2 and PYthon3 is installed. So we can use installation commands for both Python2 and Python3. The python2 version is Python2.7.16 and Python3 version is Python3.6.8 .

Install Pip with easy_install On MacOS

Update Python Mac Brew

Update Python Mac Brew 2019

easy_install is a Python module bundled with setuptools which gives us the ability to download, build, install, and manage Python packages. Before pip easy_install was the standard package manager for the Python. We can install pip with the easy_install command like below.

If the pip is already installed we can also upgrade the existing pip installation with the easy_install like below. We will use the pip command because it installed already and provide the --upgrade option with the package name which is also pip.

Install Pip with get-pip.py On MacOS

get-pip.py is another way to install pip in MacOS. get-pip.py is a Python script that will simply download and install the Pip package for Python. First, we will download the get-pip.py script with the curl command. We will provide the URL with the -o option where we will set the name of the downloaded get-pip.py file name.

AND then we will call the get-pip.py with the Python interpreter. This will run the get-pip.py file Python codes which will simply install the pip for the macOS or OS X.

Install Pip with brew On MacOS

Homebrew is the package management tool for the macOS. We can use Homebrew in order to install Python and pip. pip is provided with the python package. We will use brew command with the install command like below.

If there are problems related to the pip usage we may need to relink the python with the following command.

Update Python Mac Brew Free

Check and Display Pip Version

We can check installed pip version with the -V or --version option like below.

Upgrade Python Mac Homebrew

Python

Upgrade Python Mac Brew

We can see that Python2 pip version is pip 9.0.1 and Python3 pip version is pip 9.0.1 . They are the same version for both Python2 and Python3. This is because to prevent version conflicts and synchronize the feature development of the pip command for both Python versions.