PDF download Download Article PDF download Download Article

If you want to start programming in Python on your Windows PC, you'll need to download and install a version of Python.[1] This wikiHow teaches you how to install Python (2 or 3) using the official Windows installer, as well as how to fix the "python is not recognized as an internal or external command" that some users encounter after installing it.

Method 1
Method 1 of 3:

Installing Python 3

PDF download Download Article
  1. Go to https://www.python.org/downloads. The most recent version of Python will always appear on the "Download" button near the top of the page.
  2. If this does not start the download immediately, click Save on 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 click Download next to the most recently-updated version of Python 3.4.[2]
    Advertisement
  3. You can do so by double-clicking python-<version>.exe in your Downloads folder.
  4. " 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. It's the second blue link on the window.
  6. All 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. " If you're a system administrator, this option ensures that other users on this computer can use Python. This also changes the installation location to the Program Files\(x86)\Python(version) instead of your personal library.
    • If you didn't have the option to select "Add Python <version> to PATH" earlier, note 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 use Python, you can leave the box unchecked.
  8. It's at the bottom of the window.
  9. This installs Python on your PC. Once the installation is complete, you'll see a "Setup was successful" window—don't close it yet.
  10. It's toward the bottom of the "Setup was successful" window. This final step ensures that Python (and other apps) can use paths more than 260 characters in length.
  11. Python is now installed and ready to use.
  12. Here's how to ensure the path is set up properly:
    • Type cmd into the Windows search bar and press Enter.
    • Type python and 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.
    • Type exit() to return to the command prompt.
  13. Advertisement
Method 2
Method 2 of 3:

Installing Python 2

PDF download Download Article
  1. 1
    Be aware that Python 2.x is no longer being maintained, and is not recommended to download or program with. And if you're new, you should download the newest version and learn the newest features of the Python language.
  2. Go to https://www.python.org/downloads in 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.
  3. 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.
  4. This downloads the installer to your computer, though you may have to click Save to start the download.
    • If you have a 64-bit computer, select Windows x86-64 MSI installer.
    • If you're using a 32-bit computer, select Windows x86 MSI installer.
  5. You can do this by double-clicking python-(version).msi in your Downloads folder.
  6. If you want other users of this PC to use Python, select Install for all users. If not, select Install for just me.
  7. It's at the bottom-right corner.
  8. The default directory is fine for most people, but you can change it if you wish by selecting a different folder from the menu.
  9. 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. A menu will expand.
  11. This ensures you can run Python commands from anywhere without having to type the full path to Python.
  12. A security pop-up will appear on most systems at this point.
  13. This installs Python 2 on the PC. In a few moments, you'll see a window that says "Complete the Python Installer."
  14. Python is now installed.
  15. Here's how to ensure the path is set up properly:
    • Type cmd into the Windows search bar and press Enter.
    • Type python and 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.
    • Type exit() to return to the command prompt.
  16. Advertisement
Method 3
Method 3 of 3:

Adding the Python Path to Windows

PDF download Download Article
  1. 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. This opens the System Properties dialog.
  3. It's at the top of the window.
  4. It's near the bottom of the window.
  5. This is in the second group of variables (not the "User variables" group on top).
  6. It's at the bottom of the window.
  7. 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 delete the selected text.
    • Scroll all the way to the end of the text 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 add \Scripts to the end. Example: C:\Python27\Scripts;C:\Python27\Scripts.
    • Click OK until you've closed all windows, and then restart your PC. No need to continue with this method.
  8. It's the first button near the top-right corner of the window.
  9. For example, if Python is installed to C:\Python27, type that into the field.
  10. Now you'll have to enter just one more path.
  11. This is the same path as you typed before, except you'll be adding \Scripts to the end.
    • For example, C:\Python27\Scripts.
  12. Your new variables are saved.
  13. You should now run Python from the command line by typing python.
  14. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Which programming language will I need to use to write a music downloading website?
    R2_d2000
    R2_d2000
    Top Answerer
    You will need to use HTML, and you could also use other programming languages, like Java or JavaScript (JavaScript is not the same as Java).
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Install PythonInstall Python
Use Windows Command Prompt to Run a Python File Use Command Prompt to Run a Python File on Windows
Check Python Version on PC or Mac See the Python Version on Mac, Windows, and Linux
Start Programming in PythonStart Programming in Python
Update Pip Upgrade Pip: Quick Guide for Beginners & Experts
Uninstall PythonUninstall Python
Open a Python FileOpen a Python File
Change the PATH Environment Variable on Windows Change the PATH Environment Variable on Windows
Install Opencv in Anaconda Install OpenCV in Anaconda
Check PHP Version3 Ways to See Which Version of PHP is Installed + Troubleshooting
Run a Program from the Command Line on LinuxRun a Program from the Command Line on Linux
Install FFmpeg on WindowsEasily Download and Install FFmpeg on a Windows PC
Check Your Java Version in the Windows Command Line Check Your Java Version in the Windows Command Line
Download VS Code Download Visual Studio Code
Advertisement

Expert Interview

Thanks for reading our article! If you’d like to learn more about programming languages, check out our in-depth interview with Kevin Burnett.

References

  1. Kevin Burnett. Software Developer. Expert Interview
  2. https://docs.python.org/3/using/windows.html

About This Article

Kevin Burnett
Co-authored by:
Software Developer
This article was co-authored by Kevin Burnett and by wikiHow staff writer, Nicole Levine, MFA. Kevin Burnett is a Software Developer with over 20 years of professional experience. He works for SpiffWorkflow, a Python Process Automation tool for organizations. Prior to SpiffWorkflow, he spent the majority of his career at Rosetta Stone, a language-learning software company. He has experience with both front and back-end development and works primarily in Python, Ruby, and JavaScript. He attended the first RailsConf and the most recent PyCon US. He received an MBA and a BA in Computer Science and Spanish from Eastern Mennonite University. This article has been viewed 64,391 times.
How helpful is this?
Co-authors: 10
Updated: February 24, 2025
Views: 64,391
Article SummaryX

1. Go to https://www.python.org/downloads.
2. Download the latest version.
3. Open the installer.
4. Select Add Python to PATH.
5. Click Customize installation.
6. Click Next.
7. Select Install for all users.
8. Click Install.
9. Click Disable path length limit after installing.

Did this summary help you?

Thanks to all authors for creating a page that has been read 64,391 times.

Reader Success Stories

  • Anyomous

    Anyomous

    Jun 19, 2019

    "I was facing this problem as many times as I installed Python, but this article is superb. Now I am able to run..." more
Share your story

Is this article up to date?

Advertisement