Concepts / Installing Python on Windows

Installing Python on Windows

Windows does not include the zip command by default; download and install it from the GnuWin32 project page

  • Programming

Why zip Setup Matters

This guide focuses on installing the zip command on Windows through the GnuWin32 project. Windows does not include the zip command by default, so the command must first be downloaded and installed. After installation, Windows must also be told where to find the executable. That second part is handled by the system PATH environment variable.

From Download to Installed Files

The installation process has a simple sequence. Start at the GnuWin32 project page, download the zip package, and install it. The installation should place the command-line files in the GnuWin32 installation directory. The directory used in this guide is C:\Program Files\GnuWin32\bin. The executable that you will later check for is zip.exe.

downloadinstallcontainsGnuWin32 project pagezip packageGnuWin32 bindirectoryC:\ProgramFiles\GnuWin32\binzip.exe
What steps connect the GnuWin32 download to the installed zip executable?
  1. Open the GnuWin32 project page.
  2. Download the zip package.
  3. Install the package using the GnuWin32 installation process.
  4. Use File Explorer to check the directory C:\Program Files\GnuWin32\bin.
  5. Confirm that zip.exe is present in that directory.

How PATH Finds zip

The system PATH is a semicolon-separated list of directories. When you type a command, Windows searches those directories to locate an executable. Installing zip.exe in the GnuWin32 bin directory does not by itself tell Windows to search that directory. Adding C:\Program Files\GnuWin32\bin to the system PATH supplies that missing location.

Windows searchesincludeslocatesziptyped commandSystem PATHsemicolon-separateddirectoriesGnuWin32 binC:\ProgramFiles\GnuWin32\binzip.exe
How does Windows use PATH to find zip.exe when the command is entered?
  1. Open the Environment Variables dialog.
  2. Add C:\Program Files\GnuWin32\bin to the system PATH environment variable.
  3. Apply the change.
  4. Close the current command prompt window.
  5. Open a new command prompt window so the PATH change takes effect.

Checking the Installation

After installing the package, adding the bin directory to PATH, and opening a new command prompt, verify that Windows recognizes the command. Type zip --version. A successful installation produces output showing the zip version number and other information. This confirms that the command is available through the current command prompt.

text
open and typesuccessful setupsetup still needs checkingNew command promptzip --versionVersion informationzip is recognizedNot recognized errorzip is not recognized
What does the result of zip --version show about installation and PATH configuration?
Output
Successful output shows the zip version number and other information. An unsuccessful check shows an error stating that zip is not recognized as an internal or external command.

What do you think happens?

You installed zip.exe, added the GnuWin32 bin directory to PATH, and then ran zip --version in the command prompt that was already open. What is the most likely next step if the command is not recognized?

  • Close that command prompt and open a new one
  • Remove zip.exe from the GnuWin32 bin directory
  • Change the command to Python
Reveal answer

Answer: Close that command prompt and open a new one

The PATH change takes effect in a new command prompt window. After reopening it, run zip --version again.

Troubleshooting a Missing Command

  • Checking zip in the same command prompt that was open before PATH was changed.

    The source instructions state that the command prompt must be closed and reopened for PATH changes to take effect.

    Fix: Open a new command prompt window and run zip --version again.

  • Adding an incorrect directory to PATH.

    Windows searches the directories listed in PATH. If the correct GnuWin32 bin directory is not listed, it cannot locate zip.exe through PATH.

    Fix: Open the Environment Variables dialog and verify that the entry is exactly C:\Program Files\GnuWin32\bin.

  • Assuming installation completed without checking for zip.exe.

    The installation may not have completed successfully or the files may not have been extracted correctly.

    Fix: Use File Explorer to navigate to C:\Program Files\GnuWin32\bin and confirm that zip.exe is present.

  • Ignoring the terminal application being used.

    The source notes that a different terminal application might have its own PATH configuration separate from the standard Command Prompt.

    Fix: Check the PATH configuration for the terminal application you are using.

  1. Confirm that zip.exe exists in C:\Program Files\GnuWin32\bin.
  2. Check the PATH entry for spelling and the correct directory.
  3. Make sure you opened a new command prompt after changing PATH.
  4. Check whether your terminal application uses a separate PATH configuration.
  5. If the problem continues, reinstall GnuWin32 so that the files are extracted again.

Practice the Verification Sequence

A complete verification trace

A learner has installed GnuWin32 and wants to make zip available from a new command prompt.

Locate the executable: Use File Explorer to check C:\Program Files\GnuWin32\bin and confirm that zip.exe is present.

Configure PATH: Add C:\Program Files\GnuWin32\bin to the system PATH through the Environment Variables dialog.

Refresh the command prompt: Close the existing command prompt and open a new one so the PATH change takes effect.

Run the check: Type zip --version in the new command prompt.

Interpret the result: Version information indicates that zip is recognized. A not-recognized error means that the installation, PATH entry, command prompt refresh, or terminal configuration needs further checking.

The verification is successful when a new command prompt displays the zip version number and other information after running zip --version.

MEDIUM

After installing GnuWin32, zip --version still reports that zip is not recognized. Write the troubleshooting order you would follow before reinstalling GnuWin32.

Hints
  • Check whether zip.exe exists in the GnuWin32 bin directory.
  • Check the exact PATH entry for typos.
  • Confirm that you opened a new command prompt.
  • Consider whether your terminal application has a separate PATH configuration.

Key Takeaways

  1. Windows does not include the zip command by default, so install it from the GnuWin32 project page.
  2. The installed executable should be checked in C:\Program Files\GnuWin32\bin.
  3. Add C:\Program Files\GnuWin32\bin to the system PATH through the Environment Variables dialog.
  4. Close and reopen the command prompt after changing PATH.
  5. Run zip --version and look for version information to verify that the command is recognized.

The broader lesson is that operating systems locate command-line tools through configured paths. This same PATH concept is useful when working with Python, Node.js, Git, and other developer tools.

Key Takeaways

  • Install the zip command from the GnuWin32 project because Windows does not include it by default.
  • Use the Environment Variables dialog to add C:\Program Files\GnuWin32\bin to the system PATH.
  • Open a new command prompt after changing PATH.
  • Run zip --version and confirm that version information appears.
  • If the command is not recognized, check the executable, PATH spelling, command prompt age, and terminal configuration.