How to Use Python on Windows

by Ben Stockton

As one of the best programming languages to learn and use, it’s no wonder that millions of new coders turn their attention to learning how to use Python. It offers a low barrier of entry, with support for Python available on all major operating systems, allowing you to build projects from websites to desktop games (and more).

Python is usually found pre-installed on macOS and Linux, but there are a few additional hoops Windows users will need to jump through before they can start using Python for their projects. Here’s what you need to know if you want to learn how to use Python on Windows.

Table of Contents

    How to Install Python on Windows

    As Python doesn’t come pre-installed with Windows, you’ll first need to install it. There are two available versions of Python—Python 3 and Python 2. For compatibility reasons, you might be required to install and use Python 2 with older Python software. 

    Support for the last release of Python 2 (Python 2.7) ends in 2020, however, so at this stage, it’s probably best to stick with installing Python 3.

    How to Run Python Projects on Windows

    Once Python is installed, you’ll be free to use it to run existing Python software or begin developing your own Python projects. You’ll need a Python IDE to be able to begin coding your own Python projects, such as the pre-included IDLE, which you can run from the Windows Start menu.

    To run Python code itself, you need to use the Python interpreter. This is the software that converts Python code and executes it appropriately on your Windows PC. You’ll need to open a command line or PowerShell window to be able to use the interpreter.

    Installing Additional Python Modules

    Many Python projects are built to take advantage of other modules—shared software that other projects can use to save time, rather than “reinventing the wheel.” You can find and install additional modules using PIP, the Python Package Index. 

    You’ll need to install Python PIP first before you can begin, although if you’ve installed Python 3.4 or later, it should come pre-installed unless you removed the option during your Python pre-installation configuration.

    You can use PIP to install new modules by opening a PowerShell window and typing pip install package-name or python -m pip install package-name, replacing package-name with the name of a module package you can install. You can search for packages to install by using the search tool at the PIP website.

    Next Python Steps

    As we’ve shown here, you don’t need to switch to Linux or a Mac to be able to pick up this beginner-friendly programming language. Once you know how to use Python on Windows, you can start looking at how to use it for your hobbies and interests.

    If you want to turn your Windows installation into a better platform to test out your code, you might think about switching from the PowerShell and installing the Windows Terminal instead. Do you have your own Windows coding tips to share? Please leave them below.

    Exit mobile version