What Pip Is and Why You Need It
Pip is the package manager that comes with Python. It downloads and installs code libraries from the internet so you don't have to write everything yourself. When you install Python, pip usually installs at the same time — but sometimes it doesn't, or you need to set it up so your computer knows where to find it. This guide walks you through checking whether pip is already there, and installing it if it isn't.
The reason you're reading this is probably that you tried to use pip and got an error like "pip is not recognized" or "command not found". That means either pip didn't install with Python, or your computer doesn't know where to look for it. Both problems have straightforward fixes.
Key Takeaways
- Check whether pip is already installed by opening your terminal or command prompt and typing pip --version — if it works, you're done.
- On Windows, if Python installed but pip didn't, run the Python installer again and make sure the "pip" checkbox is marked during setup.
- On Mac and Linux, pip usually comes with Python 3, but you may need to use the command pip3 instead of pip if you have both Python 2 and Python 3.
- If pip still doesn't work after installation, the problem is usually that your computer's PATH — the list of places it looks for programs — doesn't include Python, and you may need to reinstall Python with the PATH option checked.
Check Whether Pip Is Already Installed
Before you install anything, find out whether pip is already on your computer. Open your terminal or command prompt and type this exact command:
pip --version
Press Enter. If you see a version number like "pip 23.1.2 from /usr/local/lib/python3.11/site-packages/pip", pip is already installed and working. You can stop here. If you see "command not found" or "pip is not recognized as an internal or external command", move to the section for your operating system.
On Mac or Linux, also try typing pip3 --version — you may have Python 3 with pip3 instead of pip. If that works, use pip3 whenever you see pip in instructions.
Installing Pip on Windows
On Windows, pip comes with Python, but the installer sometimes skips it. The fastest fix is to reinstall Python and make sure pip is selected. Go to python.org, read the latest Python installer for Windows, and run it.
When the installer opens, you'll see a list of options. Look for a checkbox labeled "pip" — it should already be checked, but if it isn't, check it now. Also check the box that says "Add Python to PATH" at the bottom of the window. This tells your computer where to find Python and pip when you type commands. Click "Install Now" and wait for it to finish.
After installation, open a new command prompt (search for "cmd" in the Windows search bar) and type pip --version again. If it works, you're done. If you still see an error, Python may not have been added to your PATH. Reinstall Python again, and this time pay close attention to the "Add Python to PATH" checkbox — make sure it's checked before you click Install.
Installing Pip on Mac
On Mac, Python 3 comes with pip3 built in. Open Terminal (search for "Terminal" in Spotlight) and type pip3 --version. If that works, you have pip — just remember to use pip3 instead of pip in any instructions you follow.
If pip3 doesn't work, you may not have Python 3 installed. Go to python.org, read the macOS installer, and run it. The installer will walk you through the setup. When it finishes, open a new Terminal window and type pip3 --version again.
If you see an error about "command not found" even after installing Python, your PATH may not be set up correctly. Try typing /usr/local/bin/pip3 --version — if that works, pip3 is installed but your Terminal doesn't know where to find it. This is less common on newer Macs but can happen. The simplest fix is usually to reinstall Python from python.org and let the installer handle the PATH setup automatically.
Installing Pip on Linux
On Linux, the method depends on your distribution. Most distributions come with Python 3 and pip3, so start by opening a terminal and typing pip3 --version. If that works, you're done — use pip3 in your commands.
If pip3 isn't installed, use your distribution's package manager. On Ubuntu or Debian, type sudo apt-get install python3-pip and press Enter. On Fedora, type sudo dnf install python3-pip. On Arch, type sudo pacman -S python-pip. Each command will ask for your password — type it and press Enter. The package manager will read and install pip3 automatically.
After installation, type pip3 --version to confirm it worked. From then on, use pip3 whenever you see pip in instructions.
Fixing "Python Not Found" or "Pip Not Found" Errors
If you've installed Python and pip but still get an error when you type pip --version, the problem is almost always that your computer's PATH doesn't include Python. The PATH is a list of folders your computer checks when you type a command — if Python isn't in that list, the computer can't find it.
On Windows, the easiest fix is to reinstall Python and make absolutely sure the "Add Python to PATH" checkbox is checked before you click Install. On Mac and Linux, try using the full path to pip instead: type /usr/local/bin/pip3 --version (on Mac) or /usr/bin/pip3 --version (on Linux). If that works, pip is installed but your PATH needs adjustment — reinstalling Python usually fixes this automatically.
If you're still stuck after reinstalling, you can also try opening Python directly and installing pip from inside Python itself. Type python -m pip --version (or python3 -m pip --version on Mac and Linux). If that works, you can use python -m pip instead of pip to run commands — it's longer but it works when the PATH is misconfigured.
Testing That Pip Works
Once pip --version (or pip3 --version) shows a version number without errors, pip is installed and ready. To make sure it actually works, try installing a small test package. Type pip install requests (or pip3 install requests on Mac and Linux) and press Enter.
Pip will read and install the requests library, a common tool for downloading web pages. You'll see text scrolling past as it works. When it finishes, you'll see "Successfully installed requests" or a similar message. That means pip is working correctly. You can now use pip to install any package you need for your projects.
Frequently Asked Questions
Do I need to install pip separately from Python?
No. Pip comes with Python 3.4 and newer. When you install Python from python.org, pip should install automatically. On Windows, you may need to check the pip checkbox during installation. On Mac and Linux, it's included by default.
What's the difference between pip and pip3?
Pip3 is the version that works with Python 3. If you have both Python 2 and Python 3 on your computer, pip points to Python 2 and pip3 points to Python 3. Since Python 2 is no longer supported, use pip3 on Mac and Linux. On Windows, pip usually points to Python 3 automatically.
Why does my terminal say "command not found" even though I installed Python?
Your computer's PATH doesn't include Python. On Windows, reinstall Python and check "Add Python to PATH". On Mac and Linux, try using the full path like /usr/local/bin/pip3, or reinstall Python and let the installer set up the PATH automatically.
Can I use pip to install packages for a specific project?
Yes. Many developers use virtual environments — isolated folders where each project has its own copy of pip and its own packages. This keeps projects from interfering with each other. You create a virtual environment with python -m venv project-name, then set up it before using pip. Search for "Python virtual environment" for detailed instructions.
What if I get a permission error when I try to install a package?
On Mac and Linux, you may need to type sudo pip3 install package-name to install system-wide. However, using a virtual environment (see above) is safer and avoids permission issues. If you use sudo, be careful — you're giving pip permission to change system files.