Concepts / Installing Third-Party Libraries with pip

Installing Third-Party Libraries with pip

Download Python from https://www.python.org/downloads/ only—this is the official, authoritative source

  • Programming

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.

copiescopiessets upinstallsPython installerofficial Windows setupPython executableruns Python codeStandard libraryincluded modules andfunctionspippackage managerThird-party librariescommunity-created packages
How does installing Python make pip available for installing third-party libraries?

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.

download from herepython.org/downloadsofficial Python sourceOther download sourcemay include modifications
How can you distinguish the recommended Python download path from other sources?

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.

openshowkeep selectedcontinueinstallSetup wizardinstaller launchedCustomizeInstallationinspect componentsOptional componentspip, tcl/tk, documentationAll componentscheckedleave selectedDefault installationpathaccept unless necessaryInstallation completesuccess message
Which installation choices preserve the components Python needs?

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.

Open the installer: Find the downloaded installer and double-click it to launch the setup wizard.

Choose Customize Installation: Use this option instead of relying on the simpler Install Now path, because it lets you verify the component selections.

Keep every component selected: Leave pip, tcl/tk, documentation, and the other listed components checked.

Accept 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.

Complete 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.

openenter pythondisplay version and promptLearnerCommand PromptPythonVersion and >>>Python is ready
What happens after entering python in Command Prompt?
Output
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

  • Downloading Python from a non-official source

    The downloaded environment may include modifications that differ from the standard Python environment and introduces unnecessary risk.

    Fix: Uninstall the existing Python installation and download the installer again from https://www.python.org/downloads/.

  • Unchecking components because they are labeled optional

    Skipping components can break Python functionality and can prevent pip or other needed features from being set up.

    Fix: Run Customize Installation again and leave every component checked.

  • Changing the default installation path without a specific reason

    The source instructions identify the default location as suitable for the installation.

    Fix: Accept the default path unless there is a specific reason to change it.

  • Treating the installer success message as the only verification

    The command-line check confirms whether Python is actually accessible from Windows.

    Fix: Open Command Prompt, type python, and look for the version number and >>> prompt.

  • Seeing python is not recognized and continuing without repair

    The installation may not have completed correctly, optional components may have been skipped, or the Windows PATH environment variable may not be set correctly.

    Fix: Uninstall Python, reinstall it from the official website with all components checked, and pay attention to any option concerning adding Python to PATH.

Installation Checkpoint

EASY

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.