Installing Third-Party Libraries with pip
In particular, pip is the package installer that lets Python use third-party libraries.
Why the Installation Path Matters
Before pip can install third-party libraries, Python must be installed correctly on Windows. The installation does more than copy the Python program: it also places the standard library on the computer, sets up pip, and registers Python so that Windows can find it when you type python in Command Prompt. A careful installation prevents confusing errors later.
Choosing the Official Download
Download Python only from https://www.python.org/downloads/. This is the official and authoritative source. Python is free and open-source, so it is available from many websites, but other sources can provide modified distributions or introduce unnecessary risk. The official installer is maintained by the Python Software Foundation and is tested on Windows systems.
On the official downloads page, select the Windows installer that matches your system. A filename such as python-3.12.0-amd64.exe represents a 64-bit installer; the version number changes as Python evolves. The amd64 installer is correct for modern Windows systems. Do not choose the 32-bit version unless you have a specific reason to do so.
Keeping Installer Components Selected
Locate the downloaded installer and double-click it to start the setup wizard. The first screen offers Install Now and Customize Installation. Choose Customize Installation so that you can inspect the available components. Leave every optional component checked, including pip, tcl/tk, and documentation. In this installer, optional means that the setup wizard allows you to skip a component; it does not mean that the component is safely disposable.
Accepting the Installation Path
A Correct Windows Installation
You have downloaded the Windows Python installer and want to prepare a working Python installation for pip.
- 1Open the installer
Find the downloaded installer and double-click it to launch the setup wizard.
- 2Choose Customize Installation
Use this option instead of relying on the simpler Install Now path, because it lets you verify the component selections.
- 3Keep every component selected
Leave pip, tcl/tk, documentation, and the other listed components checked.
- 4Accept the default path
Leave the suggested location unchanged unless you have a specific reason to use another location. A typical path is C:\Users\YourUsername\AppData\Local\Programs\Python\Python312, although the username and version can differ.
- 5Complete setup
Allow the installer to copy the files and finish. When the success message appears, click Close.
Python, its standard library, and pip are set up on the computer, ready for verification from Command Prompt.
The default path is usually suitable. The installer copies the Python executable to that location and places the standard library in a subfolder. The installation also registers Python with Windows so that typing python in Command Prompt can locate the executable.
Testing Python from Command Prompt
A successful installer screen is not the final test. Open Windows Command Prompt by pressing the Windows key, typing cmd, and pressing Enter. Then type python and press Enter. A correct installation displays the Python version number followed by the >>> prompt. The prompt shows that Python is running and ready to accept commands.
Python version number
>>>After you finish checking the prompt, type exit() and press Enter. This exits the Python prompt and returns you to the regular command line. You can then use python to run Python scripts from anywhere on the system.
Diagnosing a Failed Check
Common mistake Downloading Python from a non-official source
What it looks likeUsing a mirror site, third-party package manager, or bundled distribution instead of python.org/downloads/
Why it failsThe downloaded environment may include modifications that differ from the standard Python environment and introduces unnecessary risk.
Do this insteadUninstall the existing Python installation and download the installer again from https://www.python.org/downloads/.
Common mistake Unchecking components because they are labeled optional
What it looks likeRemoving pip, tcl/tk, documentation, or other listed components during Customize Installation
Why it failsSkipping components can break Python functionality and can prevent pip or other needed features from being set up.
Do this insteadRun Customize Installation again and leave every component checked.
Common mistake Changing the default installation path without a specific reason
What it looks likeReplacing the suggested installation location during setup
Why it failsThe source instructions identify the default location as suitable for the installation.
Do this insteadAccept the default path unless there is a specific reason to change it.
Common mistake Treating the installer success message as the only verification
What it looks likeClosing the installer without typing python in Command Prompt
Why it failsThe command-line check confirms whether Python is actually accessible from Windows.
Do this insteadOpen Command Prompt, type python, and look for the version number and >>> prompt.
Common mistake Seeing python is not recognized and continuing without repair
What it looks likeCommand Prompt displays an error instead of the Python version and prompt
Why it failsThe installation may not have completed correctly, optional components may have been skipped, or the Windows PATH environment variable may not be set correctly.
Do this insteadUninstall Python, reinstall it from the official website with all components checked, and pay attention to any option concerning adding Python to PATH.
Installation Checkpoint
Describe the correct action at each checkpoint: the download source, the first installer screen, the optional component screen, the installation path screen, and the final Command Prompt test.
Hints
- The download source must be the official Python website.
- Choose Customize Installation and keep all components checked.
- Accept the default installation path unless there is a specific reason not to.
- The final test uses python and should show a version number and the >>> prompt.
- Download the Windows installer from https://www.python.org/downloads/.
- Choose the installer matching the Windows system; amd64 is the 64-bit choice for modern Windows systems.
- Launch the installer and choose Customize Installation.
- Keep pip, tcl/tk, documentation, and all other listed components selected.
- Accept the default installation path and let setup finish.
- Open Command Prompt, type python, and confirm the version number and >>> prompt.
- Type
exit()to leave the Python prompt.
Key Takeaways
- Use only https://www.python.org/downloads/ as the Python download source.
- Choose Customize Installation and keep every optional component checked, especially pip.
- Accept the default installation path unless there is a specific reason to change it.
- Verify the installation in Command Prompt by typing python and checking for the version number and >>> prompt.
- If python is not recognized, reinstall from the official source and check the components and PATH option.