Pip For Python On Mac



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. Prerequisite: Python Language Introduction Before we start with how to install pip for Python on macOS, let’s first go through the basic introduction to Python. Python is a widely-used general-purpose, high-level programming language. Python is a programming language that lets you work quickly and integrate systems more efficiently.

How to Install pip on mac OS : You are a Mac user and want to install pip to install python libraries? Then this tutorial is for you. I’ll show you how to install it on MacOS in the easiest way possible.

3Install Pip with get-pip.py On MacOS

Python Install Pip On MacOS?

Python is one of the most popular programming languages. To fully use its power it is necessary to install third party libraries that are not present in the base version installed by default. To install these libraries, the most commonly used method is the PIP command. PIP is a package manager used to install and manage packages written in the Python language. Many packages are located in directories on the Python Package Index (Pypi) repository. One of the major advantages of pip is the ease of its command-line interface.

Check Python Version

Python

By default MacOS comes with a version of Python. To verify that a version of Python is installed directly on your Mac, open the terminal and execute the following command:

If the command returns a version number then you do have python to install. For other cases, I invite you to install python by following this video tutorial :

Install Pip with get-pip.py On MacOS

This python file get-pip.py is a script that will download and install the Pip package for the Python language. The first step is to download the get-pip.py script using the curl command ( if you want more details about this command, please readthe article I wrote about this command). Execute the following command to get the script :

The -o option is used to define the name of the downloaded file.

Once the script is downloaded, simply execute the script using Python :

Mac

Check Pip Version

To check that Pip is properly installed, just type the following command in the terminal :

Note : It is also possible to use the –version option instead of -V

Install Pip with brew On MacOS

There is a second method to install Pip using Homebrew. Homebrew is a package management tool available for macOS. To use it, just type the following command:

easy_install Deprecated

Before 2019 it was possible to use easy_install (setuptools module). But since then it is not recommended to use this method to install Pip.

Check this link for more information :

Install packages with Pip on MacOS

Once you have installed Pip, you will be able to install the packages you are interested in with the following command :

packageName is the name of the package you want to install.

Upgrade Pip on MacOS

To update the version of Pip, you can use this command :

Summary


  • Install Pip with get-pip.py : use the curl command to download the file to install Pip
  • Install Pip with brew : Homebrew is the packet manager of macOS
  • easy_install has been deprecated : Do not use this method

Install Pip Macos Brew


Pip For Python On Mac Shortcut

I hope this tutorial allowed you to install Pip in your Mac. Feel free to ask me your questions in comments, I would be happy to answer them! 🙂

Amazon MacBook PRO (Affiliate)

If you want to get the new MacBook Pro to work in good conditions (As an Amazon Partner, I make a profit on qualifying purchases) :