Skip to main content

Setup

Before we start writing Python code, we need to set up our development environment.

In this workshop, we will use PyCharm Community Edition, a free and beginner-friendly IDE.

Installing Python

First, download and install Python from the official website:

https://www.python.org/downloads/

During installation, make sure to check the option "Add Python to PATH".

This allows you to run Python from the terminal.

Verifying the installation

After installing Python, open a terminal and run:

python --version

If everything is set up correctly, you should see the installed Python version.

Installing PyCharm Community Edition

Download PyCharm Community Edition from:

https://www.jetbrains.com/pycharm/download/

Choose the Community version (not Professional), then follow the installation steps for your operating system.

Creating your first project

Open PyCharm and:

  1. Click "New Project"
  2. Choose a location for your project
  3. Make sure the Python interpreter is detected automatically
  4. Click "Create"

PyCharm will create the project structure for you.

Creating and running your first file

  1. Right-click inside the project panel
  2. Select "New" → "Python File"
  3. Name it main

In the file, write:

main.py
print("Hello, world!")

To run the program:

  • Right-click the file and select "Run 'main'"
  • or click the green run button in the top-right corner

You should see the output in the terminal at the bottom of the screen.

info
  • If Python is not detected automatically, you can select the interpreter manually from the project settings
  • Do not worry if the interface feels unfamiliar at first; we will only use a few basic features during the workshop