Python Tutorial

Introduction

Edit Template
  • Home
  • /
  • Python Installation

Python Tutorial

Introduction

Edit Template
  • Home
  • /
  • Python Installation

Python Installation

Before you write your first line of Python code, you need to set up the Python environment on your computer. Thankfully, it’s a simple process.

Installing Python

To get started with Python, here’s what you need to do:

  • Visit the official Python website:
    Head over to python.org.

  • Download the installer:
    Choose the correct version for your operating system (Windows, macOS, or Linux). If you’re on Windows, make sure to select the 64-bit version unless you know otherwise.

  • Run the installer:
    Double-click the downloaded file and follow the setup instructions. Be sure to check the box that says “Add Python to PATH”—this makes using Python from the terminal much easier.

Once installed, you can confirm everything worked by opening your terminal or command prompt and typing:

				
					python --version

				
			

You should see the version number of Python you just installed.

Writing Your First Python Program

You can now write Python code in any environment of your choice. Beginners often start with:

  • The built-in Python IDLE

  • A lightweight code editor like VS Code

  • Or even an online compiler like Replit or Google Colab

Let’s try the classic “Hello World” example:

				
					print("Hello World !!!")

				
			

Save the file as hello.py, and run it in your terminal like this:

				
					python hello.py

				
			

You should see the output:

				
					Hello World !!!

				
			

Just like that, you’ve run your first Python program!

Installing Packages with pip

Python becomes even more powerful when you add external libraries. To do this, we use a package manager called pip. It usually comes bundled with Python, so there’s no need for a separate installation.

To install a library, use the following command:

				
					pip install package_name

				
			

Summary

You’ve now set up Python, written your first script, and learned how to install external packages. With these basics covered, you’re ready to explore Python’s core features.

Scroll to Top