What is pip?
Python is a programming language. A package is a ready-made piece of code that others wrote. Pip is the helper that downloads and installs these packages for you. It is like an app store you use by typing.
Good news: pip often comes with Python
Modern Python for Windows includes pip. So the easiest way is to install Python itself.
Steps to install Python and pip
- Open your web browser and go to python.org. Find the Downloads page.
- Download the latest Windows installer.
- Open the file you downloaded.
- Tick the box Add python.exe to PATH. This lets Windows find Python from any folder.
- Click Install Now.
- Wait until you see "Setup was successful". Click Close.
Check that pip works
- Press the Windows key, type
cmdand open Command Prompt. This is a window where you type commands. - Type this and press Enter:
This command prints the pip version. If you see a number, you are done.pip --version
If pip is missing
If Windows says "pip is not recognized", try these steps.
- Run this command:
This command installs pip from inside Python.python -m ensurepip --upgrade - Check again with
pip --version. - Still not working? Run the Python installer again. Choose Modify and make sure pip is ticked.
- You can also try
py -m pip --version.
Use pip
| Command | What it does |
|---|---|
pip install requests | Installs a package called requests |
pip list | Shows installed packages |
pip uninstall requests | Removes the package |
python -m pip install --upgrade pip | Updates pip itself |
Tip: Close and reopen Command Prompt after installing Python. The old window does not see the new settings.
Quick recap
- Pip installs Python packages.
- It comes with Python on Windows.
- Tick Add python.exe to PATH during setup.
- Check with
pip --version. - Repair with
python -m ensurepip --upgrade.