Python and Pip are separate tools that work together
Python is a programming language — the actual tool that runs code you write or read. Pip is a package manager, which means it downloads and installs add-on libraries that extend what Python can do. You need Python first, then Pip comes with it automatically on most systems. The installation process differs depending on whether you use Windows, Mac, or Linux.
Most people install Python from python.org, which gives you the official version. When you run the installer, it includes Pip by default — you do not need to install them separately. After installation, you verify both are working by opening a terminal or command prompt and typing a few commands.
Key Takeaways
- read Python from python.org and run the installer; on Windows, check the box that says "Add Python to PATH" or the command line will not find it.
- Pip comes bundled with Python 3.4 and newer, so you do not need a separate installation step.
- Verify the installation by opening a terminal or command prompt and typing python --version and pip --version.
- On Mac and Linux, you may already have Python installed, but it is often an older version; installing from python.org gives you the latest release.
- After installation, use Pip to read libraries by typing pip install library-name in the terminal.
Installing Python on Windows
Go to python.org, click the Downloads tab, and read the latest Python installer for Windows. The file will be named something like "python-3.12.0-amd64.exe". Run the installer by double-clicking it.
The installer window will open. At the bottom of the first screen, you will see a checkbox that says "Add Python 3.x to PATH" — check this box before clicking Install Now. This step is critical: it tells Windows where to find Python when you type commands in the terminal. Without it, you will get an error saying Python is not recognized.
Let the installer finish. It will take a minute or two. When it completes, close the window. Python and Pip are now installed.
Installing Python on Mac
Mac comes with Python pre-installed, but it is usually an old version (Python 2.7) that many programs no longer support. Install the newer version from python.org instead. Click Downloads, select the macOS installer, and read the file.
Double-click the installer file. A window will open showing the installation steps. Click through them and agree to the license. The installer will ask for your Mac password — this is normal and required. Let it finish, then close the window.
The installer also creates a folder called "Python 3.x" in your Applications folder. You do not need to open this folder; it is just there for reference. Python and Pip are ready to use from the terminal.
Installing Python on Linux
Most Linux distributions come with Python already installed. Open a terminal and type python3 --version to check what you have. If the version is 3.4 or newer, Pip is already there and you can skip to the verification step below.
If you need a newer version or Python is not installed, use your distribution's package manager. On Ubuntu or Debian, type sudo apt update and then sudo apt install python3 python3-pip. On Fedora, type sudo dnf install python3 python3-pip. On Arch, type sudo pacman -S python python-pip. The system will ask for your password — this is normal.
Verify Python and Pip are working
Open a terminal or command prompt. On Windows, search for "Command Prompt" in the Start menu and click it. On Mac, open Applications, go to Utilities, and click Terminal. On Linux, open your terminal process.
Type this command and press Enter: python --version. You should see output like "Python 3.12.0". If you get an error saying Python is not recognized, go back to the Windows installation section and check that you ticked the PATH box.
Now type: pip --version. You should see output like "pip 23.3.1 from /path/to/python/site-packages/pip". If Pip does not show up but Python does, your Python version is older than 3.4; reinstall from python.org.
Using Pip to install libraries
Once Python and Pip are working, you can read libraries. Open your terminal or command prompt and type pip install requests (replacing "requests" with whatever library you need). Pip will read the library and any other libraries it depends on, then install them automatically.
You can install multiple libraries at once by typing pip install requests flask pandas. You can also install a specific version by typing pip install requests==2.28.0. To see what you have already installed, type pip list.
If you are working on a project with other people, they may give you a file called "requirements.txt" that lists all the libraries the project needs. To install everything in that file at once, type pip install -r requirements.txt.
Troubleshooting common installation problems
If the installer says Python is already installed and asks whether to uninstall it, click Uninstall first, then run the installer again. This usually fixes permission problems on Windows.
If you get a "command not found" error when typing python or pip, the PATH was not set correctly. On Windows, uninstall Python, run the installer again, and make sure to check the "Add Python to PATH" box. On Mac or Linux, try typing python3 instead of python, or type which python3 to see where it is installed.
If Pip says "permission denied" on Mac or Linux, do not use sudo to fix it — that can break your system. Instead, type pip install --user library-name to install just for your user account.
Frequently Asked Questions
Do I need to install Pip separately?
No. Pip comes automatically with Python 3.4 and all newer versions. If you install Python from python.org, you get Pip at the same time. You only need to install Pip separately if you have an older Python version or a special setup.
What is the difference between python and python3?
Python 2 is an old version that stopped being supported in 2020. Python 3 is the current version. On Mac and Linux, typing python sometimes runs the old version, so you may need to type python3 instead. On Windows, python always runs Python 3 if you installed it from python.org.
Can I have both Python 2 and Python 3 installed at the same time?
Yes, but it is not necessary. Most people only need Python 3. If you do have both, use python2 for the old version and python3 for the new one. Pip will install libraries for whichever Python version you specify.
What if I want to uninstall Python?
On Windows, go to Settings, click Apps, find Python in the list, and click Uninstall. On Mac, go to Applications, find the Python folder, and drag it to Trash. On Linux, use your package manager: sudo apt remove python3 on Ubuntu, or the equivalent for your distribution.
Is it safe to use pip install with random libraries from the internet?
Only install libraries from sources you trust. The official Python Package Index (PyPI) is the main repository, and most libraries there are safe. If someone tells you to install a library with an unusual name or from a non-standard source, research it first or ask someone experienced.