When Guido van Rossum released the first viable Python version 0.9.0 in 1991, he couldn’t have expected (by a long shot) that he was on the verge of creating the most influential programming language in the world. Python has a bright future: every new Python version adds new features to the programming language.
In this quickstart guide, you’ll learn how to set up Python on your computer and install the newest version. Because Python is constantly evolving, we keep this information as generalized as possible.
So, how to get started with Python? Let’s go over the steps one by one.
Step 1: Download Python
First, please visit the official Python website and download the latest Python version. The download manager should already propose the correct installer for your operating system because it receives this information through your browser accessing the site.
Step 2: Install Python on Your Machine
Second, run the installer on your computer. In most operating systems, there’s nothing more to it than double clicking the downloaded file.
Step 3: Check Your Python Installation
Third, check if your Python installation worked properly by running the following command in your command line or PowerShell (Windows), terminal (MacOS), or shell (Linux).
$ python –version Python 3.8.3
Related: You can find all about checking your Python version on my detailed blog article.
Here’s a screenshot checking the Python version on my Windows machine:
Congratulations, you have installed Python on your computer!
Step 4: Write Your First Hello World Program with IDLE
You can start writing your own programs with the IDLE editor that’s built into your system. Just search the phrase ‘IDLE’ on your operating system and open the program:
To start your first own program, type the following command into your shell:
>>> print('hello world!')
Python will interpret your command and print the desired words to your shell:
This mode of communicating back-and-forth with your Python interpreter is called “interactive mode”. It has the advantage of immediate feedback. However, the great things about programs is automation—writing a program once and running it again and again.
For example, how to write a program that greets you by name every time you run it?
Step 5: Create Your First Python Module
To allow you to write a program once, save it on your computer, and run it at any later point in time, Python comes with what you may call a “scripting mode”. In this mode, you write a Python script and store it in a file with the suffix
.py such as
You can create such a file via the menu of your IDLE shell:
Click “New File” and copy&paste the following code into your new file:
name = input("What's your name? ") print('hello ' + name)
You’ll learn about the commands of the Python programming language in my free email academy (with cheat sheets). For now, please store your file under the name
'hello.py' on your Desktop or any other location. Your current state should look like this:
You can test-run this program here in your browser in our interactive Python shell:
Exercise: Run the code and type in your name. What’s the output?
Step 6: Run Your First Module
Now, let’s get some action going: Click
Run > Run Module. The Python program start executing in the interactive shell—but without you needing to type each line into it. It runs through the code file line by line. The first line asks you to put in your name. Type it in. The second line then takes your name and prints it to the shell. Here’s how this looks in my case:
Believe it or not, this procedure will later allow you to run your own applications. Although the applications will get more complicated, the basic process looks the same: First, you create a Python file that contains the application. Second, you run the application on your computer. Theoretically, you don’t need any other Python editor – the preinstalled IDLE editor is all you need!
While this is already a great accomplishment for the day, most coders don’t use the built-in Python editor IDLE a lot. Why? Because it’s harder with the IDLE editor to write simple programs and the editor doesn’t provide you with advanced tools, assistance, and language support. Instead, a far better option for most coders will be to install an integrated development environment (IDE). One of the most popular for Python is PyCharm.
However, this is an optional step and different coders prefer different development environments. You can find detailed installation and setup guides online. We recommend you follow these instructions to set up your own PyCharm projects. Even if this takes you an hour or so to complete, it’s a good investment in your future productivity!
Where to Go From Here?
Enough theory. Let’s get some practice!
Coders get paid six figures and more because they can solve problems more effectively using machine intelligence and automation.
To become more successful in coding, solve more real problems for real people. That’s how you polish the skills you really need in practice. After all, what’s the use of learning theory that nobody ever needs?
You build high-value coding skills by working on practical coding projects!
Do you want to stop learning with toy projects and focus on practical code projects that earn you money and solve real problems for people?
🚀 If your answer is YES!, consider becoming a Python freelance developer! It’s the best way of approaching the task of improving your Python skills—even if you are a complete beginner.
If you just want to learn about the freelancing opportunity, feel free to watch my free webinar “How to Build Your High-Income Skill Python” and learn how I grew my coding business online and how you can, too—from the comfort of your own home.
While working as a researcher in distributed systems, Dr. Christian Mayer found his love for teaching computer science students.
To help students reach higher levels of Python success, he founded the programming education website Finxter.com that has taught exponential skills to millions of coders worldwide. He’s the author of the best-selling programming books Python One-Liners (NoStarch 2020), The Art of Clean Code (NoStarch 2022), and The Book of Dash (NoStarch 2022). Chris also coauthored the Coffee Break Python series of self-published books. He’s a computer science enthusiast, freelancer, and owner of one of the top 10 largest Python blogs worldwide.
His passions are writing, reading, and coding. But his greatest passion is to serve aspiring coders through Finxter and help them to boost their skills. You can join his free email academy here.