How to Update Pip on Windows, Mac, & Linux: Easy Tutorial (2024)

  • Categories
  • Computers and Electronics
  • Software
  • Programming
  • Python

Download Article

Keep your Python environment up-to-date with this simple guide

Co-authored byNicole Levine, MFAReviewed byLuigi Oppido

Last Updated: December 11, 2023Fact Checked

Download Article

  • Using Python
  • |
  • Using Install Script
  • |
  • Using Python Installer
  • |
  • |
  • Using Homebrew
  • |
  • Tips

If you haven't updated Pip, the Python package manager, in a while, you might be using an outdated version. The easiest way to update Pip is to do so from within Python. If you also need to upgrade Python, installing the latest version of Python will also get the most up-to-date version of Pip. Whether you use Terminal/Command Prompt commands, the Python installer, or a package manager, it's easy to update Pip on Windows, macOS, and Linux. We'll show you how, plus give you helpful troubleshooting tips along the way.

Things You Should Know

  • If you're using Python 3.4 or later, you can update Pip using the command python -m pip install --upgrade pip.
  • To check your Pip version, use pip3 -V (Python 3) or pip2 -V (Python 2).
  • If you want to update Python in addition to Pip, you can do so by downloading the installer, using Homebrew, or your Linux distribution's package manager.

Method 1

Method 1 of 5:

Updating from Python

Download Article

  1. 1

    Open a Terminal or Command Prompt window. The most straightforward way to update Pip is from the command line. Because Python 3.4 and later comes with Pip, you can easily update it without downloading a new package.[1]

    • Mac: Type Terminal into Spotlight search and select Terminal.
    • Linux: Press Ctrl + Alt + T or click Terminal in your app list.
    • Windows: Type command prompt into the Windows search bar and click Command Prompt.
  2. 2

    Check the current Pip version (optional). Run the command pip -V to see which version of Pip is installed. This command will print the version number to the terminal.

    • If you have both Python 2 and Python 3 installed, the pip command may evoke Python 2 instead of the latest version. Use pip3 -V to check the version of Pip for Python 3, and pip2 -V to check for Python 2.
    • If you're using Python 3.4 or earlier, Pip may not be installed. In this case, use python -m ensurepip --upgrade to install it now.
    • If you're using Windows and get the error "pip is not recognized as an internal or external command," make sure you've installed Python. If you have installed Python and get this error, you'll need to add Python to your Windows path and then relaunch Command Prompt. To learn how, see Adding the Python Path to Windows.

    Advertisem*nt

  3. 3

    Run the command python -m pip install --upgrade pip to update Pip. If this command doesn't work on Windows, use py -m pip install --upgrade pip instead.

    • If you get permissions errors in Linux, run sudo python -m pip install --upgrade pip.
    • If you have both Python 2 and Python 3, update Pip for each version separately:
      • python3 -m pip install --upgrade pip
      • python2 -m pip install --upgrade pip
  4. Advertisem*nt

Method 2

Method 2 of 5:

Using the PIP Install Script

Download Article

  1. 1

    Open a Terminal or Command Prompt window. If you're using a version of Python 3 older than Python 3.4, you can use a script to install the latest version of Pip. This method will not work for deprecated versions of Python, including Python 2.[2]

    • Mac: Type Terminal into Spotlight search and select Terminal.
    • Linux: Press Ctrl + Alt + T or click Terminal in your app list.
    • Windows: Type command prompt into the Windows search bar and click Command Prompt.
  2. 2

    Download the script file. You can do this easily using curl on any operating system, as it's preinstalled. Just run the command curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py at the prompt and wait for the script to download.[3]

  3. 3

    Install the latest version of Pip. To do so, run the downloaded script using the command python3 get-pip.py. This installs the latest version of Pip for Python 3.

  4. 4

    Check your Pip version. In the Terminal or Command Prompt window, run the command pip3 -v

  5. Advertisem*nt

Method 3

Method 3 of 5:

Downloading the Installer (Windows & Mac)

Download Article

  1. 1

    Check your current Python version. If you want to update both Python and Pip, you can download and install the latest version of Python. Before you do this, make sure you're not already using the latest version. To check, open Command Prompt or Terminal and run python --version.

    • Only use this method if you want to update Python as well as Pip. If Python is already up to date on your PC or Mac, update pip via Python instead.
    • If the version number starts with 2 instead of 3, run python3 --version to see if Python 3 is also installed and find the version number.
  2. 2

    Find the latest version at https://www.python.org/downloads. Compare your version of Python to the version in the yellow "Download Python" button at the top of the page.

  3. 3

    Download the Python installer. If you're using an older Python version than the latest release, click the yellow Download button to download the latest installer.

  4. 4

    Run the installer. Double-click the downloaded file and follow the on-screen instructions to install. Once Python is installed, you'll have the latest version of Pip.

    • On Windows, make sure to check the box next to "Add python.exe to PATH" at the bottom of the installer to ensure you can run Python and Pip commands from any location.
  5. 5

    Check your Pip version. In a new Command Prompt or Terminal window, run the command pip -v to check the Pip version.

    • If you have both Python 2 and Python 3, run pip3 -v to check the Pip version of Python 3.
  6. Advertisem*nt

Method 4

Method 4 of 5:

Using a Linux Package Manager

Download Article

  1. 1

    Open a Terminal window. You can do so on most Linux distributions by pressing Ctrl + Alt + T.

    • Use this method if you want to update both Python and Pip at the same time.
  2. 2

    Check your current Python version. If you're already using the latest version of Python, there's no need to use this method. Run the command python3 --version to check. Then, compare your version to the latest stable release at https://www.python.org/downloads.

  3. 3

    Update your system's repository list.

    • Ubuntu and Debian: sudo apt update
    • CentOS, Fedora, Redhat: sudo dnf upgrade
  4. 4

    Install Python 3 from your distro's package manager. Once you run the command to install the latest version of Python 3, Pip will also be upgraded.

    • Ubuntu and Debian: sudo apt install python3
    • CentOS, Fedora, Redhat: sudo dnf install python3.
  5. Advertisem*nt

Method 5

Method 5 of 5:

Using Homebrew (Mac)

Download Article

  1. 1

    Open a Terminal window. You can update both Python and Pip using Homebrew if you prefer. You should only use this method if you need to upgrade Python as well as Pip.

    • Before you continue, make sure Homebrew is installed. To check, type brew -v and press Return. If the command is not found, you'll need to install Homebrew using this command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"[4]
    • To check your Python version, run the command python3 --version. Compare your version to the latest stable release available from https://www.python.org/downloads/macos.
    • If the command is not found, Python 3 is not installed. Continue with this method to install it.
  2. 2

    Run the command brew install pyenv. This command installs a library that can help you manage your Python versions.

  3. 3

    Run the command pyenv install -l to view all versions of Python. To make sure you're getting the latest version of Python (and the latest version of pip), you can run this command to find the most recent version number.

  4. 4

    Run the command pyenv install version-number. For example, to install Python 3.11.5, you'd type pyenv install 3.11.5 and press Return. This installs the latest version of Python 3 and pip.[5]

    • Now that you have the latest pip version, you can update it in the future using the command python3 -m pip install --upgrade pip.
  5. Advertisem*nt

Expert Q&A

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

      Advertisem*nt

      Tips

      • If you're using Linux, avoid using sudo to install Python packages. If you install a package that contains malicious code with root permissions, you risk giving the attacker unrestricted access to your system.[6]

        Thanks

        Helpful0Not Helpful0

      Submit a Tip

      All tip submissions are carefully reviewed before being published

      Name

      Please provide your name and last initial

      Submit

      Thanks for submitting a tip for review!

      Advertisem*nt

      You Might Also Like

      How toUse Windows Command Prompt to Run a Python FileHow to Uninstall a Python Package With Pip: Step-by-Step Guide
      How toOpen a Python FileHow to See the Python Version on Mac, Windows, and LinuxHow toChange the Font Size in Python ShellHow toStart Programming in PythonHow toUninstall PythonHow toProgram a Game in Python with PygameHow to Code a Python Countdown Timer: Step-by-Step GuideHow toCreate a Very Simple Program in PythonHow toWrite a Coin Flipping Program on PythonHow toRead/Write in a Text File Using Python on a Macbook

      Advertisem*nt

      About This Article

      How to Update Pip on Windows, Mac, & Linux: Easy Tutorial (43)

      Reviewed by:

      Luigi Oppido

      Computer & Tech Specialist

      This article was reviewed by Luigi Oppido and by wikiHow staff writer, Nicole Levine, MFA. Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over two years. This article has been viewed 113,436 times.

      How helpful is this?

      Co-authors: 3

      Updated: December 11, 2023

      Views:113,436

      Categories: Python

      In other languages

      Indonesian

      Spanish

      • Print
      • Send fan mail to authors

      Thanks to all authors for creating a page that has been read 113,436 times.

      Is this article up to date?

      Advertisem*nt

      How to Update Pip on Windows, Mac, & Linux: Easy Tutorial (2024)

      FAQs

      How do I upgrade my pip on my Mac? ›

      After downloading the latest Python version from the official Python website, locate the downloaded installer file and double-click to open it. In the installer window, ensure to check the "Add Python to PATH" option. Running the installer will upgrade both Python and Pip, which are included with the installer.

      How do I upgrade pip in Windows? ›

      Run the command python -m pip install --upgrade pip to update Pip. If this command doesn't work on Windows, use py -m pip install --upgrade pip instead. If you get permissions errors in Linux, run sudo python -m pip install --upgrade pip .

      How do I update all pip packages in Windows? ›

      The easiest way to update all packages in a Windows environment is to use pip in conjunction with Windows PowerShell:
      1. Open a command shell by typing 'powershell' in the Search Box of the Task bar.
      2. Enter: pip freeze | %{$_.split('==')[0]} | %{pip install --upgrade $_}
      Jan 31, 2020

      How to install pip on Windows and Linux? ›

      Follow the steps below to install PIP using this method.
      1. Step 1: Download PIP get-pip.py. Before installing PIP, download the get-pip.py file. ...
      2. Step 2: Installing PIP on Windows. To install PIP, run the following Python command: python get-pip.py. ...
      3. Step 3: Verify Installation. ...
      4. Step 4: Add Pip to Path. ...
      5. Step 5: Configuration.
      Nov 30, 2023

      How do I update my pip? ›

      PIP phone number to notify DWP of a change
      1. Telephone: 0800 121 4433.
      2. Textphone: 0800 121 4493.
      3. Open times: Monday to Friday, 9 am to 5 pm.
      4. Cost: Calls are free from landlines and mobiles.
      Aug 15, 2023

      How to upgrade pip in Linux? ›

      How To Upgrade PIP
      1. Step 1: Open Command Prompt on your Windows system, macOS, or terminal in Linux. For Windows: Enter Windows+R and type CMD and enter. For Mac: Press command + space key, type terminal, and hit the enter button. ...
      2. Step 2: Execute the following command: python -m Pip install --upgrade Pip.
      May 8, 2023

      How do I install the latest version of pip? ›

      Windows
      1. Download the get-pip.py file and store it in the same directory as python is installed.
      2. Change the current path of the directory in the command line to the path of the directory where the above file exists.
      3. Run the command given below: python get-pip.py. ...
      4. Voila! pip is now installed on your system.
      Mar 23, 2020

      How do I upgrade a specific version of pip? ›

      To upgrade an installed package, call pip install with the --upgrade flag.

      How do I upgrade my pip library to the latest version? ›

      Using pip to Update Python Standard Library Packages
      1. Identify the Package to Update. ...
      2. Open a Terminal or Command Prompt. ...
      3. Use the pip install --upgrade Command. ...
      4. Syntax. ...
      5. Check for Updates and Dependencies. ...
      6. Verify the Update. ...
      7. Consider Compatibility. ...
      8. Limited Package Independence.
      Feb 15, 2024

      How do I get the latest version of pip package? ›

      Get Latest Python Package Version
      1. Install the package and see what version it installed, then add it to your requirements file.
      2. Run pip freeze | grep <package_name> and see what version is installed and then add it to your requirements file.
      3. Go to pypi.org and look for the package and see what the latest version is.
      Nov 8, 2023

      How do I check if an update is available in pip? ›

      To see if a Python package has been updated, type `pip show <package_name>` in your terminal. Check the version it shows. To find the latest version, visit the package's page on the Python Package Index (PyPI) or use `pip search <package_name>`. If the installed version is lower than the latest, an update is available.

      How to check the pip version? ›

      Pip on Windows

      The output of pip --version tells you which version of pip is currently installed, and which version of Python it's set up to install packages for. This is especially helpful if you have more than one version of Python installed on your system.

      How to install pip macOS? ›

      Install pip on Mac using Ensurepip
      1. Open Terminal from Applications > Utilities.
      2. Type: python -m ensurepip or python3 -m ensurepip.
      3. Press Return.
      4. If pip isn't already installed, Ensurepip will install it.
      5. If you want to upgrade pip instead of installing it from scratch, add upgrade to the end of the command in step 2.
      Jul 20, 2023

      How to install pip manually on Linux? ›

      How to Install PIP3 in Linux
      1. Verify Python Installation. Before installing pip3, it's essential to ensure that Python 3 is installed on your Linux system. ...
      2. Update Package Manager. Ensure that your system's package manager is up to date. ...
      3. Install pip3 in Linux. ...
      4. Verify pip3 Installation in Linux.
      Aug 21, 2024

      How to check if you have pip installed in Windows? ›

      How to check if pip is installed on Windows and Mac: In Command Prompt on Windows or Terminal on Mac, type and enter: pip --version . If pip version is shown then it is installed.

      How do I find the version of pip on my Mac? ›

      You can check if pip is already installed on your Mac by typing pip --version in the Terminal. If pip is installed, you should see the version number. If not, you will see an error message.

      How do I install a specific version of pip on my Mac? ›

      To install a specific version of a package using pip in python, you can use the package name followed by the version number you want to install and use the == operator. In the above example, we are installing version 2.0.

      How to install pip packages on Mac? ›

      Open Terminal: You can find Terminal in your Applications folder under Utilities, or you can search for it using Spotlight. Check for pip: Type pip --version or pip3 --version (for Python 3) to check if pip is installed. Install a Package: Use the pip install command followed by the package name.

      Top Articles
      New York federal court denies Coinbase motion for judgment over SEC enforcement actions | ABA Banking Journal
      Master the Iron Condor : 20 Ways to Adjust You're Condor
      Maxtrack Live
      Where are the Best Boxing Gyms in the UK? - JD Sports
      Brady Hughes Justified
      Find All Subdomains
      DL1678 (DAL1678) Delta Historial y rastreo de vuelos - FlightAware
      2013 Chevy Cruze Coolant Hose Diagram
      Www.paystubportal.com/7-11 Login
      Used Wood Cook Stoves For Sale Craigslist
      Dumb Money
      Breakroom Bw
      WWE-Heldin Nikki A.S.H. verzückt Fans und Kollegen
      Think Up Elar Level 5 Answer Key Pdf
      Sand Castle Parents Guide
      Colts Snap Counts
      Wizard Build Season 28
      Katherine Croan Ewald
      Roll Out Gutter Extensions Lowe's
      All Obituaries | Buie's Funeral Home | Raeford NC funeral home and cremation
      PowerXL Smokeless Grill- Elektrische Grill - Rookloos & geurloos grillplezier - met... | bol
      Nz Herald Obituary Notices
      Is Windbound Multiplayer
      Surplus property Definition: 397 Samples | Law Insider
      Weldmotor Vehicle.com
      Craigslist List Albuquerque: Your Ultimate Guide to Buying, Selling, and Finding Everything - First Republic Craigslist
      Keyn Car Shows
      Jersey Shore Subreddit
      Jazz Total Detox Reviews 2022
      Sinfuldeed Leaked
      Lincoln Financial Field, section 110, row 4, home of Philadelphia Eagles, Temple Owls, page 1
      Devotion Showtimes Near The Grand 16 - Pier Park
      Chicago Pd Rotten Tomatoes
      Smayperu
      Baddies Only .Tv
      Arcadia Lesson Plan | Day 4: Crossword Puzzle | GradeSaver
      Skill Boss Guru
      Heelyqutii
      Tiny Pains When Giving Blood Nyt Crossword
      Unifi Vlan Only Network
      Myanswers Com Abc Resources
      Craigslist Tulsa Ok Farm And Garden
      Tryst Houston Tx
      Inducement Small Bribe
      Tableaux, mobilier et objets d'art
      Citroen | Skąd pobrać program do lexia diagbox?
      Mynord
      Online-Reservierungen - Booqable Vermietungssoftware
      Breaking down the Stafford trade
      The Cutest Photos of Enrique Iglesias and Anna Kournikova with Their Three Kids
      Jackerman Mothers Warmth Part 3
      4Chan Zelda Totk
      Latest Posts
      Article information

      Author: Prof. Nancy Dach

      Last Updated:

      Views: 5696

      Rating: 4.7 / 5 (57 voted)

      Reviews: 80% of readers found this page helpful

      Author information

      Name: Prof. Nancy Dach

      Birthday: 1993-08-23

      Address: 569 Waelchi Ports, South Blainebury, LA 11589

      Phone: +9958996486049

      Job: Sales Manager

      Hobby: Web surfing, Scuba diving, Mountaineering, Writing, Sailing, Dance, Blacksmithing

      Introduction: My name is Prof. Nancy Dach, I am a lively, joyous, courageous, lovely, tender, charming, open person who loves writing and wants to share my knowledge and understanding with you.