Starting with Python

Before we actually start writing code, we need to download and install Python and then pick a code editor. That’s what we’ll cover in this short post.

Installing Python

Step 1: Download Python

  1. Go to python.org.
  2. Download the latest version for your operating system (Windows, macOS, or Linux).
  3. During installation, make sure to check the box that says “Add Python to PATH.”
  • This makes sure you can run Python from the command line without extra setup.

Step 2: Verify the Installation

Let’s check that Python was installed correctly.

  • On Windows: Open Command Prompt (search for cmd in the Start Menu).
  • On Mac: Open Terminal (search for Terminal in Spotlight Search).

Type this command:

python --version

If everything worked, you’ll see the version number printed.

Troubleshooting Installation Issues

If something doesn’t go quite right, don’t worry—there are plenty of other guides to walk you through it.

Here are some useful guides from geeksforgeeks:

Choosing an Editor

Python code can be written in a bunch of different editors. Try a few out and see what feels right.

  • Jupyter Notebook – Great for beginners and especially good for data analysis.
  • VS Code – An editor with excellent Python support. This is my go-to because I use multiple languages. It is extensible, so you can add plugins and customize it however you like.
  • IDLE– Python’s built-in editor. It’s basic, but it does the job.
  • PyCharm – PyCharm is built specifically for Python. Great if you’re doing bigger projects.

Running Python Code

There are several ways to run Python:

  1. In a script – Save your code in a .py file and run it.
  2. In a Jupyter Notebook – Great for running code one chunk at a time.
  3. In the terminal/command prompt – You can run Python interactively right from the command line.

Try this simple command in  whichever setup you choose:

print("Hello, Python!")

If you see that message printed back to you, you’re good to go!

What’s Next?

In the next post, we’ll introduce variables. After that, we’ll take a look at the fictional dataset we’ll be using throughout the series.

See you in the next one!

Recommended Python Books

Plan your day with Sunsama! Get started with a 30-day trial.

It pays to have a financial ally. $100 to be exact. Open a new Ally Bank account to earn money for you and your family.

Recent Posts