Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

How to Install Python on Windows

Learn how to install python on Windows with clear steps, practical context, and useful troubleshooting guidance.

Table of Contents

This updated guide examines How to Install Python on Windows and organizes the essential facts, background, and practical takeaways in clear American English.

Method 1of 3:

Installing Python 3

  1. How to Install Python on Windows — contextual image 1 Go tohttps://www.python.org/downloads. The most recent version of Python will always appear on the "Download" button near the top of the page.
    • If you want to use Python 2, see the "Installing Python 2" method.
  2. How to Install Python on Windows — contextual image 2 ClickDownload Python. If this does not start the download immediately, clickSaveon the pop-up window to start it.
    • Python 3.7 and newer will run on any Windows operating system except Windows XP. If you need to install Python 3 on XP, scroll down and clickDownloadnext to the most recently-updated version of Python 3.4.[1]
  3. How to Install Python on Windows — contextual image 3 Run the installer. You can do so by double-clicking python-.exe in your Downloads folder.
  4. How to Install Python on Windows — contextual image 4 Check the box next to "Add Python to PATH." It's at the bottom of the window.
    • If you don't see this option, you'll need to complete this method after you finish installing Python.
  5. How to Install Python on Windows — contextual image 5 ClickCustomize installation. It's the second blue link on the window.
  6. How to Install Python on Windows — contextual image 6 Review the installation options and clickNext. All of Python's features are selected by default. Unless you have a specific need to skip installing any part of this package, just leave these settings alone.
  7. How to Install Python on Windows — contextual image 7 Check the box next to "Install for all users." If you're a system administrator, this option ensures that other users on this computer are able to use Python. This also changes the installation location to theProgram Files(x86)Python(version)instead of your personal library.
    • If you didn't have the option to select "Add Python to PATH" earlier, make note of the installation directory that appears here. You'll need to add it to your system variables after installing.
    • If you don't want anyone else on the computer to be able to use Python, you can leave the box unchecked.
  8. How to Install Python on Windows — contextual image 8 ClickInstall. It's at the bottom of the window.
  9. How to Install Python on Windows — contextual image 9 ClickYesto confirm. This installs Python on your PC. Once the installation is complete, you'll see a "Setup was successful" window—don't close it just yet.
  10. How to Install Python on Windows — contextual image 10 ClickDisable path length limit. It's toward the bottom of the "Setup was successful" window. This final step ensures that Python (and other apps) to use paths more than 260 characters in length.
  11. How to Install Python on Windows — contextual image 11 ClickYesto confirm. Python is now installed and ready to use.
  12. How to Install Python on Windows — contextual image 12 ClickCloseto exit the installer.
  13. How to Install Python on Windows — contextual image 13 Test your Python installation. Here's how to make sure the path is set up properly:
    • Typecmdinto the Windows search bar and press↵Enter.
    • Typepythonand press↵Enter. You should see>>>at the beginning of the current line. This means Python is working and the path is set correctly.
    • If you see an error that says "python is not recognized as an internal or external command," see the "Adding the Python Path to Windows" method.
    • Typeexit()to return to the command prompt.

Method 2of 3:

Installing Python 2

  1. How to Install Python on Windows — contextual image 14 Go tohttps://www.python.org/downloadsin a web browser. Use this method if you want to write code in Python 2 instead of (or in addition to) Python 3 in Windows.
  2. How to Install Python on Windows — contextual image 15 Scroll down and click a Python 2 version. The versions appear under the "Looking for a specific release?" header.
    • If you don't know which version of Python 2 to install, just click the first version beginning with "2." In the list. This ensures you're using the most recently-updated version.
  3. How to Install Python on Windows — contextual image 16 Scroll down and select an installer. This downloads the installer to your computer, though you may have to clickSaveto start the download.
    • If you have a 64-bit computer, selectWindows x86-64 MSI installer.
    • If you're using a 32-bit computer, selectWindows x86 MSI installer.
  4. How to Install Python on Windows — contextual image 17 Run the Python installer. You can do this by double-clicking python-(version).msi in your Downloads folder.
  5. How to Install Python on Windows — contextual image 18 Select an option for installing. If you want other users of this PC to be able to use Python, selectInstall for all users. If not, selectInstall for just me.
  6. How to Install Python on Windows — contextual image 19 ClickNext. It's at the bottom-right corner.
  7. How to Install Python on Windows — contextual image 20 Select an install directory (optional). The default directory is fine for most people, but you can change it if you wish by selecting a different folder from the menu.
  8. How to Install Python on Windows — contextual image 21 ClickNext.
  9. How to Install Python on Windows — contextual image 22 Scroll down to the bottom of the "Customize Python" features list. You should see an option called "Add python.exe to Path." It probably has an "X" on its corresponding button.
    • If you don't see this option, see this method after installing Python.
  10. How to Install Python on Windows — contextual image 23 Click theXbutton next to "Add python.exe to Path. " A menu will expand.
  11. How to Install Python on Windows — contextual image 24 ClickWill be installed on local hard drive. This ensures that you can run Python commands from anywhere without having to type the full path to Python.
  12. How to Install Python on Windows — contextual image 25 ClickNext. A security pop-up will appear on most systems at this point.
  13. How to Install Python on Windows — contextual image 26 ClickYesto continue. This installs Python 2 on the PC. In a few moments, you'll see a window that says "Complete the Python Installer."
  14. How to Install Python on Windows — contextual image 27 ClickFinishon the installer. Python is now installed.
  15. How to Install Python on Windows — contextual image 28 Test your Python installation. Here's how to make sure the path is set up properly:
    • Typecmdinto the Windows search bar and press↵Enter.
    • Typepythonand press↵Enter. You should see>>>at the beginning of the current line. This means Python is working and the path is set correctly.
    • If you see an error that says "python is not recognized as an internal or external command," see the "Adding the Python Path to Windows" method.
    • Typeexit()to return to the command prompt.

Method 3of 3:

Adding the Python Path to Windows

  1. How to Install Python on Windows — contextual image 29 Press⊞Win+Rto open the Run dialog. Use this method if you're installing an older version or see the "python is not recognized as an internal or external command" error when trying to use Python.
  2. How to Install Python on Windows — contextual image 30 Typesysdm.cpland clickOK. This opens the System Properties dialog.
  3. How to Install Python on Windows — contextual image 31 Click theAdvancedtab. It's at the top of the window.
  4. How to Install Python on Windows — contextual image 32 ClickEvironment Variables. It's near the bottom of the window.
  5. How to Install Python on Windows — contextual image 33 Select thePathvariable under "System variables. " This is in second group of variables (not the "User variables" group on top).
  6. How to Install Python on Windows — contextual image 34 ClickEdit. It's at the bottom of the window.
  7. How to Install Python on Windows — contextual image 35 Edit the variables on Windows Vista and earlier. If you're using Windows 10, 8, or 7, skip to the next step. If you're using XP or Vista:
    • Click inside the "Variable value" box to deselect the selected text.
    • Scroll all the way to the end of the text that's already in the "Variable value" box.
    • Type a semicolon;at the end of the text (no spaces).
    • Type the full path to Python (e.g.,C:Python27) right after the semicolon.
    • Type a semicolon;at the end of what you just typed (no spaces).
    • Type the full path again, but addScriptsto the end. Example:C:Python27Scripts;C:Python27Scripts.
    • ClickOKuntil you've closed all windows, and then restart your PC. No need to continue with this method.[2]
  8. How to Install Python on Windows — contextual image 36 ClickNew. It's the first button near the top-right corner of the window.
  9. How to Install Python on Windows — contextual image 37 Enter the full path to Python. For example, if Python installed toC:Python27, type that into the field.
  10. How to Install Python on Windows — contextual image 38 Press↵Enter. Now you'll have to enter just one more path.
  11. How to Install Python on Windows — contextual image 39 ClickNewagain.
  12. How to Install Python on Windows — contextual image 40 Enter the full path to the Python "Scripts" directory. This is the same path as you typed before, except you'll be addingScriptsto the end.
    • For example,C:Python27Scripts.
  13. How to Install Python on Windows — contextual image 41 Press↵Enter. Your new variables are saved.
  14. How to Install Python on Windows — contextual image 42 ClickOKand thenOKagain. You should now be able to run Python from the command line just by typingpython.

FAQ

What is How to Install Python on Windows about?

It provides a structured overview of python, explains the main context, and highlights practical takeaways for readers.

Why does this topic matter?

Understanding the main concepts helps readers evaluate the issue, avoid common mistakes, and make better-informed decisions.

How should readers use this information?

Use the guidance as a practical starting point, confirm details that may have changed, and follow current product, safety, or security recommendations.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.