Python comes with pip built in on most systems, but you need to install Python first
Pip is Python's package manager — the tool that downloads and installs code libraries you need for your projects. It comes automatically when you install Python 3.4 or newer. The steps differ slightly by operating system, but the process takes about five minutes on any of them.
You do not need to install pip separately. Once Python is on your computer, pip is ready to use. The real decision is which Python version to download and where to get it from.
Key Takeaways
- Python 3.12 (the current stable version) includes pip automatically, so you only need to download and run one installer.
- On Windows, the official Python installer from python.org is the most straightforward route and includes a checkbox to add Python to your system path.
- On Mac, you can use the official installer or Homebrew, a package manager that handles updates automatically.
- On Linux, Python usually comes pre-installed, but you may need to run a single command to ensure pip is present.
- After installation, open a terminal or command prompt and type python --version and pip --version to confirm both are working.
Installing Python on Windows
Go to python.org, click the Downloads button, and download the latest Python installer for Windows. The site detects your system and offers the right version automatically. Run the installer file when the download finishes.
The installer opens a window with setup options. Check the box labeled "Add Python to PATH" near the bottom — this step matters, because it lets you run Python and pip from any folder on your computer. Then click "Install Now" and let it finish.
Once the installer closes, open Command Prompt (search for "cmd" in the Windows search box) and type these two commands to check that both Python and pip are working:
- python --version — should show something like "Python 3.12.0"
- pip --version — should show a version number and a file path
If both commands return version numbers, Python and pip are installed and ready to use.
Installing Python on Mac
Mac comes with Python 2 pre-installed, but Python 2 is no longer supported. You need Python 3. The easiest route is Homebrew, a package manager that handles updates automatically.
If you do not have Homebrew, open Terminal (search for "Terminal" in Spotlight) and paste this command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once Homebrew is installed, type this command to install Python 3:
brew install python3
When the installation finishes, verify both are working by typing:
- python3 --version
- pip3 --version
On Mac, the commands are python3 and pip3 (with the 3) rather than python and pip. This is normal and expected.
Alternatively, you can download the official installer from python.org and run it the same way as Windows. The Homebrew route is simpler if you plan to update Python regularly.
Installing Python on Linux
Most Linux distributions come with Python 3 already installed. Open a terminal and type:
python3 --version
If a version number appears, Python is there. Now check pip:
pip3 --version
If pip3 is missing, install it with your system's package manager. On Ubuntu and Debian-based systems, type:
sudo apt install python3-pip
On Fedora or Red Hat-based systems, type:
sudo dnf install python3-pip
On Arch Linux, type:
sudo pacman -S python-pip
After installation, run pip3 --version again to confirm it is working.
Verifying the installation and using pip
Once Python and pip are installed, you can start downloading packages. For example, to install a popular library called requests (used for downloading web pages), open your terminal or command prompt and type:
pip install requests
On Mac or Linux, use pip3 instead of pip. Pip downloads the package and any other packages it depends on, then installs them all automatically.
To see what packages you have installed, type:
pip list
This shows every package pip has installed on your system, along with version numbers.
Troubleshooting common installation problems
If you type pip --version and get an error like "command not found" or "is not recognized", Python was installed but not added to your system path. On Windows, run the Python installer again, choose "Modify", and check "Add Python to PATH". On Mac or Linux, use the full path to pip instead: /usr/local/bin/pip3 --version.
If pip works but you cannot install packages, your system may block downloads. Try adding a flag to the install command:
pip install --user requests
The --user flag installs packages in your user folder instead of the system folder, which usually works when the standard method does not.
If you see a message about upgrading pip itself, you can do so by typing:
pip install --upgrade pip
Frequently Asked Questions
Do I need to install pip separately from Python?
No. Pip comes built into Python 3.4 and newer. Once you install Python, pip is already there. You only need to run the Python installer.
What is the difference between pip and pip3?
On systems with both Python 2 and Python 3 installed, pip usually refers to Python 2 (which is no longer supported) and pip3 refers to Python 3. Most modern systems only have Python 3, so pip and pip3 do the same thing. When in doubt, use pip3.
Can I use Python without pip?
Yes. Python's built-in libraries work without pip. But pip is how you download third-party libraries like requests, numpy, or Django. If you only use Python's standard library, you do not need pip, but most projects require at least one external package.
How do I uninstall a package I installed with pip?
Type pip uninstall package-name, replacing "package-name" with the actual name. For example, pip uninstall requests removes the requests library. Pip asks for confirmation before removing anything.
What if I have multiple Python versions installed?
You can have Python 3.11 and Python 3.12 on the same computer. Each has its own pip. To use a specific version, type the full version number: python3.12 -m pip install requests installs the package for Python 3.12 specifically. The -m pip syntax ensures you are using the correct pip for that Python version.