What pip is and why you need it

Pip is the package manager for Python — it downloads and installs libraries and tools that other people have written, so you don't have to build everything from scratch. When you find a Python project that needs a package like requests (for working with web data) or numpy (for math and data work), pip is what fetches it from the internet and puts it where Python can find it.

Python 3.4 and newer versions come with pip already included, so if you installed Python recently, you likely have it. But it's worth checking, because sometimes the installation doesn't complete properly or your system doesn't have it in the right place for Windows to find it.

Key Takeaways

  • Python 3.4 and newer include pip automatically, but you need to verify it's installed and accessible from your command line.
  • Open Command Prompt and type pip --version to check if pip is already working on your machine.
  • If pip is missing, you can reinstall or repair Python using the official installer, making sure to check the box for "Add Python to PATH" during setup.
  • Once pip works, you can install packages by typing pip install package-name in Command Prompt.
  • If you have multiple Python versions installed, use py -m pip instead of just pip to avoid confusion.

Check if pip is already installed

Before you do anything else, find out whether pip is already on your system. Open Command Prompt by pressing the Windows key, typing cmd, and pressing Enter. A black window will open.

Type this line exactly and press Enter:

pip --version

If you see a response like pip 23.1.2 from C:\Users\YourName\AppData\Local\Programs\Python\Python311\lib\site-packages\pip (python 3.11), pip is already installed and working. You can stop here. If you see 'pip' is not recognized as an internal or external command, move to the next section.

Reinstall or repair Python to add pip

The most reliable way to get pip on Windows is to reinstall Python and make sure the pip option is selected. Go to python.org, click Downloads, and download the latest Python installer for Windows (the file will be named something like python-3.12.0-amd64.exe).

Run the installer. On the first screen, you will see two checkboxes at the bottom: one says "Add Python 3.x to PATH" and the other says "Install pip". Check both boxes. This is the step most people miss — if you don't check "Add Python 3.x to PATH", Windows won't know where to find Python or pip when you type commands.

Click "Install Now" and wait for the installer to finish. Once it's done, open Command Prompt again and type pip --version to confirm it worked.

Use the Python launcher if you have multiple Python versions

If you have installed Python more than once (for example, Python 3.10 and Python 3.12 on the same machine), typing just pip might use the wrong version. Windows includes a tool called the Python launcher that picks the right one for you.

Instead of typing pip install package-name, type this:

py -m pip install package-name

The py command tells Windows to use the launcher, and -m pip tells it to run pip as a module. This works even if pip isn't in your PATH, and it always uses your most recent Python version. If you want to specify a particular Python version, you can type py -3.10 -m pip install package-name to use Python 3.10 specifically.

Install your first package to test pip

Once pip is working, test it by installing a simple package. Open Command Prompt and type:

pip install requests

The requests package is small and widely used, so it downloads quickly. You should see output that says "Successfully installed requests" at the end. If you see that message, pip is ready to use.

From now on, when you need a package, you can install it the same way: pip install package-name. To see what packages you already have installed, type pip list.

Troubleshoot if pip still doesn't work

If you've reinstalled Python and checked both boxes but pip still isn't recognized, the problem is usually that Python isn't in your PATH. Open Command Prompt and type:

python --version

If that works but pip --version doesn't, Python is installed but pip isn't in the right place. Try this instead:

python -m pip --version

If that works, use python -m pip install package-name for all your package installations. If neither works, uninstall Python completely (go to Settings > Apps > Apps & Features, find Python, and click Uninstall), restart your computer, and reinstall Python again, making absolutely sure to check "Add Python 3.x to PATH" on the first screen of the installer.

Frequently Asked Questions

What's the difference between pip and pip3?

On Windows, pip and pip3 usually point to the same thing — the pip for Python 3. On Mac or Linux, pip might refer to Python 2 (which is no longer supported), so people use pip3 to be clear. On Windows, either command works, but pip is simpler.

Can I use pip if I installed Python from the Microsoft Store?

Yes, but you may need to use python -m pip instead of just pip. The Microsoft Store version of Python sometimes doesn't add itself to PATH automatically. Test with pip --version first; if it doesn't work, try python -m pip --version.

Is it safe to install packages with pip?

Packages on PyPI (the official repository pip uses) are not vetted by a central authority, so you should install packages from sources you trust — usually well-known projects with active communities. Stick to packages recommended in tutorials or documentation for the project you're working on.

How do I uninstall a package I installed with pip?

Type pip uninstall package-name and press Enter. Pip will ask you to confirm; type y and press Enter. The package is then removed from your system.