Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
🟢 Beginner  ·  Lesson 02

Python Installation and Setup (Windows, VS Code, IDLE)

In this lesson: Download and install Python, add to PATH, check version, use IDLE or VS Code and run hello.py — easy steps in Hindi & English.

Why install Python

To write and run Python programs on your own computer, you first install Python — the language and its interpreter that runs your code. It is free and works on Windows, Mac and Linux. Once installed, you can run programs, use libraries, and build real projects.

💡 On Windows the one step people forget is ticking "Add Python to PATH" during install — do not skip it.

Downloading Python

  1. Go to the official website python.org and open the Downloads page.
  2. Download the latest stable version for your operating system.
  3. Run the installer you downloaded.

Always download from python.org, not from random sites, so you get a safe, official copy.

Add to PATH (important)

On Windows, the first installer screen has a checkbox at the bottom: "Add Python to PATH". Tick it before clicking Install.

⚠️ If you forget this, the command line will say "python is not recognised". Ticking it lets you run python from any folder.

Check the version

After installing, open the command line (Command Prompt on Windows, Terminal on Mac/Linux) and type:

python --version
Python 3.12.0

If you see a version number, Python is installed correctly. On Mac/Linux you may need python3 --version instead.

Run your first program

Create a file called hello.py with this line:

print("Hello, Python!")

Open the command line in that folder and run:

python hello.py
Hello, Python!

That is it — you have written and run your first Python program. print() shows text on the screen.

Choosing an editor

  • IDLE — comes with Python, simple, great for your first days.
  • VS Code — free, powerful, with a Python extension; best for real projects.
  • Thonny — beginner-friendly, shows variables as you go.

Start with IDLE or Thonny if you are new, then move to VS Code as your projects grow.

Common mistakes

  • Forgetting "Add to PATH". Then python is not recognised in the terminal.
  • Downloading from the wrong site. Always use python.org.
  • Using python vs python3. On Mac/Linux the command is often python3.
  • Saving without a .py extension. The file must end in .py to run as Python.

Summary

  • Install Python from the official python.org site.
  • On Windows, tick "Add Python to PATH" during install.
  • Check it with python --version.
  • Run a program with python filename.py.
  • Start with IDLE or Thonny, then use VS Code for bigger projects.

Next, learn the basics in Python variables, or write decisions with if-else in Python.

Frequently Asked Questions

How do I install Python on my computer?
Download the installer from the official python.org website, run it, and on Windows tick "Add Python to PATH" before clicking Install. On Mac and Linux, Python is often already available, but you can install the latest version the same way.
Why must I tick "Add Python to PATH"?
Ticking "Add to PATH" lets you run python from any folder in the command line. If you forget it, the terminal will say "python is not recognised", and you would have to reinstall or fix the PATH manually.
How do I check if Python is installed?
Open the command line and type python --version (or python3 --version on Mac/Linux). If it shows a version number like Python 3.12, Python is installed correctly.
What is the difference between IDLE and VS Code?
IDLE is a simple editor that comes with Python — good for first steps. VS Code is a powerful free editor with extensions, better for real projects. Beginners can start with IDLE and move to VS Code later.
How do I run a Python file?
Save your code in a file ending in .py, open the command line in that folder, and type python filename.py. The program runs and shows its output right there.
← Back to Python Tutorial
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

Next topicFirst Python Program: Hello World Your progress: 2 / 66 (3%) · Lesson 3 / 66 Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free