🟢 Beginner · Lesson 02
Python Setup: Windows, VS Code and IDLE
Python Installation and Setup
Before writing Python programs, Python must be installed correctly on your computer. Setup means installing Python, checking version, setting PATH, choosing an editor and running your first .py file.
Installation Steps
| Step | Action |
|---|---|
| 1 | Download Python 3 from the official Python website. |
| 2 | During installation, tick Add Python to PATH. |
| 3 | Open Command Prompt/Terminal and check python --version. |
| 4 | Check package manager using pip --version. |
| 5 | Install VS Code and Python extension for better coding. |
Important Commands
Terminal Commands
python --version pip --version python hello.py
Create and Run hello.py
hello.py
print("Hello from Python")Hello from Python
Common Setup Problems
python is not recognized: Python PATH is not set properly.pip is not recognized: pip/PATH issue; reinstall or repair Python.- File saved as
hello.py.txt: enable file extensions and save as.py. - Running command in wrong folder: use
cd foldernamefirst.
Summary
A correct setup includes Python 3, pip, a working terminal command and an editor like VS Code. Once hello.py runs successfully, you can start learning Python topics.
💻 Live Code Editor
This page's programs are ready here — run them, edit them, and learn. No installation needed.
Powered by OneCompiler. The code loads into the editor automatically — press Run to see the output. If the editor does not open, open it in a new tab.