How to Use Python on Windows
Build websites, games and lots more
As one of thebest programming languages to learnand 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.
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-includedIDLE, 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 toinstall Python PIPfirst 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 typingpip install package-nameorpython -m pip install package-name, replacingpackage-namewith the name of a module package you can install. You can search for packages to install by using the search tool at thePIP 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 andinstalling the Windows Terminalinstead. Do you have your own Windows coding tips to share? Please leave them below.
Ben Stockton is a freelance technology writer based in the United Kingdom. In a past life, Ben was a college lecturer in the UK, training teens and adults. Since leaving the classroom, Ben has taken his teaching experience and applied it to writing tech how-to guides and tutorials, specialising in Linux, Windows, and Android. He has a degree in History and a postgraduate qualification in Computing.Read Ben’s Full Bio
Leave a Reply
Your email address will not be published.Required fields are marked*
Comment*
Name*
Email*
Website
Welcome to Help Desk Geek- a blog full of tech tips from trusted tech experts. We have thousands of articles and guides to help you troubleshoot any issue. Our articles have been read over 150 million times since we launched in 2008.
HomeAbout UsEditorial StandardsContact UsTerms of Use
Copyright © 2008-2024 Help Desk Geek.com, LLC All Rights Reserved