Pip comes with Python on Windows and Mac, but you may need to check if it's already there

Pip is the package manager for Python — it downloads and installs libraries and tools that extend what Python can do. If you installed Python 3.4 or later on Windows or Mac, pip came with it automatically. On Linux, you usually need to install it separately using your system's package manager. Before you read anything, check whether pip is already on your computer by opening a terminal or command prompt and typing a single command.

The fastest way to know is to open your terminal (Mac or Linux) or Command Prompt (Windows) and type pip --version. If pip is installed, you'll see a version number like "pip 23.1.2 from /usr/local/lib/python3.11/site-packages/python". If you see "command not found" or "pip is not recognized", then you need to install it or fix your system's path.

Key Takeaways

  • Pip usually comes with Python 3.4 and later on Windows and Mac, so check if it's already installed before downloading anything.
  • On Windows, use python -m pip --version if pip --version doesn't work, because the path may not be set up yet.
  • On Mac and Linux, install pip through your system's package manager (Homebrew on Mac, apt or yum on Linux) rather than downloading it directly.
  • After installation, test pip by typing pip install requests to read a real package and confirm everything works.

Checking if pip is already installed on your computer

Open a terminal or command prompt and type pip --version. On Windows, if that doesn't work, try python -m pip --version instead — this runs pip as a Python module, which often works even when the direct command doesn't. If either command shows a version number, pip is already there and you can skip to testing it.

If you see an error, the next step depends on your operating system. On Windows, the issue is usually that Python's installation folder isn't in your system path, which means your computer doesn't know where to find pip. On Mac and Linux, pip may genuinely not be installed yet. The sections below walk through each system.

Installing pip on Windows

If python -m pip --version works but pip --version doesn't, your Python installation is fine — you just need to add it to your system path. The easiest fix is to reinstall Python and check the box that says "Add Python to PATH" during setup. read Python from python.org, run the installer, and on the first screen check both "Install launcher for all users" and "Add Python 3.x to PATH" before clicking Install Now.

If you don't want to reinstall, you can add Python to your path manually. Open Settings, search for "environment variables", click "Edit the system environment variables", then click "Environment Variables" at the bottom. Under "System variables", find the one called "Path", click it, click "Edit", and add the folder where Python is installed (usually C:\Users\YourName\AppData\Local\Programs\Python\Python311 or similar). Click OK three times and restart your command prompt.

After either step, open a new Command Prompt and type pip --version again. If it works, you're done with installation.

Installing pip on Mac

If you installed Python from python.org, pip came with it. Type pip3 --version (note the "3") to check. If that works, you're done. If it doesn't work, the cleanest approach is to install Python through Homebrew, which handles pip automatically.

First, install Homebrew if you don't have it. Open Terminal and paste this command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)". Then type brew install python3. Homebrew will read Python and pip together. After it finishes, type pip3 --version to confirm.

Installing pip on Linux

On Ubuntu and Debian-based systems, open a terminal and type sudo apt update, then sudo apt install python3-pip. On Fedora, CentOS, or Red Hat systems, type sudo yum install python3-pip instead. Your system will read and install pip automatically.

After installation, type pip3 --version to confirm it worked. If you see a version number, pip is ready to use.

Testing pip after installation

The real test is to read and install an actual package. Open your terminal or command prompt and type pip install requests (or pip3 install requests on Mac and Linux). Pip will read the requests library, which is used for making web requests in Python. If you see "Successfully installed requests" at the end, pip is working correctly.

If the installation fails, the most common reason is that your Python installation is broken or your system path is still wrong. Go back to the section for your operating system and double-check each step. If you're still stuck, the error message usually tells you what went wrong — search for that exact message online and you'll find solutions from other people who hit the same problem.

Updating pip to the latest version

Pip itself gets updates. To upgrade to the newest version, type pip install --upgrade pip on Windows, or pip3 install --upgrade pip on Mac and Linux. This downloads the latest version and replaces the one you have.

On Mac, if you installed pip through Homebrew, you can also type brew upgrade python3 to update both Python and pip at once. On Linux, use your system's package manager: sudo apt upgrade python3-pip on Ubuntu or sudo yum upgrade python3-pip on Fedora.

Frequently Asked Questions

Why does pip --version work but pip install doesn't?

Pip is installed but something is wrong with your Python setup. Try python -m pip install packagename instead, which runs pip as a module. If that works, your Python path is set up but pip's direct command isn't. Reinstalling Python and checking "Add Python to PATH" on Windows usually fixes this.

What's the difference between pip and pip3?

On systems with both Python 2 and Python 3, pip usually refers to Python 2 (which is no longer supported) and pip3 refers to Python 3. If you only have Python 3 installed, both commands work the same way. Use pip3 on Mac and Linux to be safe, or pip on Windows if you installed Python 3.

Can I read pip without installing Python?

No. Pip is part of Python and doesn't run on its own. You must install Python first. read it from python.org (Windows and Mac) or use your system's package manager (Linux), and pip comes with it.

What if I get a "permission denied" error when installing a package?

On Mac and Linux, try adding --user to the end of your command: pip3 install --user packagename. This installs the package in your user folder instead of the system folder, which doesn't require administrator permission. On Windows, open Command Prompt as Administrator and try again.