How to Install and Use Pip on Windows
In this article
Yes, you can install and use pip on Windows to manage Python packages easily. Pip is Python’s package installer, allowing you to download, install, upgrade, and remove libraries and tools from the Python Package Index (PyPI). To use pip, you must first have Python installed with pip included—this is standard in most modern Python installations. Once set up, you can run pip commands directly in Command Prompt or PowerShell.
What You'll Need
- A Windows 10 or Windows 11 computer (Windows 7 or 8 may work but are not officially supported)
- Python installed (version 3.6 or higher recommended)
- Administrative access (to install Python if not already present)
- An internet connection (to download packages)
Step-by-Step
- Verify if Python is already installed: Press Windows + R, type
cmd, and press Enter. In the Command Prompt, typepython --versionorpy --versionand press Enter. If you see a version number (e.g., Python 3.11.5), Python is installed. If not, proceed to the next step. - Download Python from the official website: Open your browser and go to python.org/downloads. Click the yellow button labeled “Download Python” for the latest version.
- Run the installer: Locate the downloaded file (usually in your Downloads folder), double-click it, and when the setup window appears, check the box that says Add Python to PATH. This is critical—without it, you won’t be able to run Python or pip from the command line. Then click “Install Now”.
- Wait for installation to complete: The installer will set up Python and automatically include pip. Do not modify advanced options unless you are certain of the changes.
- Verify pip installation: Open a new Command Prompt window (important—reopen to refresh PATH changes). Type
pip --versionand press Enter. You should see output likepip 23.x.x from C:\...\site-packages\pip. If you get an error, close the window, reopen it, and try again. - Upgrade pip (recommended): Even if pip is installed, it may be outdated. Run
python -m pip install --upgrade pipto ensure you have the latest version. - Install a package using pip: Test pip by installing a common package like
requests. Typepip install requestsand press Enter. Wait for the download and installation to finish. - Verify the package installed: Run
pip show requeststo see details about the installed package. You can also usepip listto see all installed packages. - Use pip in Python scripts: Open IDLE or a code editor, and try importing the package with
import requests. If no error appears, the package works. - Uninstall a package (optional): To remove a package, run
pip uninstall requestsand confirm when prompted.
Common Mistakes
- Forgetting to check “Add Python to PATH”: This is the most common error. Without this, Windows won’t recognize
pythonorpipcommands. - Using an outdated or corrupted installer: Always download Python from python.org, not third-party sites.
- Running commands in the wrong terminal: If you get “command not recognized,” ensure you’re using Command Prompt or PowerShell, not Windows Terminal unless properly configured.
- Not reopening the terminal after install: PATH changes require a new terminal session.
- Using
pipinstead ofpython -m pip: In some cases, especially with multiple Python versions, usingpython -m pipavoids conflicts.
Tips
- Use
pyinstead ofpythonon Windows if you have multiple Python versions. The Python launcher helps manage them. - Always upgrade pip before installing major packages to avoid compatibility issues.
- Use virtual environments with
python -m venv myenvto isolate project dependencies and prevent conflicts. - Run
pip helpto see all available commands and options. - Use
pip install --user package_nameto install packages for your user only, avoiding permission issues.
Troubleshooting
If pip is not recognized, first confirm Python is installed and was added to PATH. Re-run the installer and ensure “Add Python to PATH” is checked. If pip is still missing, manually repair the installation via Windows Settings > Apps > Installed apps, find Python, click Modify, then Repair.
If you get a “Permission denied” error, avoid running Command Prompt as administrator unless necessary. Instead, use the --user flag to install packages locally.
If pip fails with a connection error, check your internet connection. Corporate networks may block PyPI—contact your administrator or use a trusted proxy if allowed.
If a package fails to install due to missing build tools (e.g., for packages with C extensions), install Microsoft C++ Build Tools or use pre-compiled wheels via pip install package_name --only-binary=all.
For persistent issues, reinstall Python completely: uninstall via Apps settings, delete any leftover Python folders in C:\Python or AppData, then reinstall from python.org.
Frequently Asked Questions
Is pip included with Python on Windows?
Yes, pip is included by default in Python 3.4 and later when installed using the official installer from python.org.
How do I check if pip is installed?
Open Command Prompt and type pip --version. If you see version details, pip is installed. If not, reinstall Python with “Add Python to PATH” enabled.
Can I use pip without installing Python?
No. Pip is a Python package manager and requires Python to run. You must install Python first.
Why does “pip is not recognized” appear?
This means Python or pip is not in your system’s PATH. Reinstall Python and ensure “Add Python to PATH” is checked during setup.
How do I update pip on Windows?
Run python -m pip install --upgrade pip in Command Prompt. This ensures you’re using the correct Python environment.
Can I install pip separately?
While possible using get-pip.py, it’s not recommended. Always install pip via the official Python installer for reliability and security.