🟢 Beginner  ·  Lesson 02

Python Setup: Windows, VS Code and IDLE

Python Setup: Windows, VS Code और 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

StepAction
1Download Python 3 from the official Python website.
2During installation, tick Add Python to PATH.
3Open Command Prompt/Terminal and check python --version.
4Check package manager using pip --version.
5Install 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 foldername first.

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.

Python Installation और Setup

Python programs लिखने से पहले computer में Python सही तरीके से install होना चाहिए। Setup का मतलब है Python install करना, version check करना, PATH set करना, editor choose करना और first .py file run करना।

Installation Steps

StepAction
1Python 3 download करें।
2Installation के time Add Python to PATH tick करें।
3Command Prompt/Terminal में python --version check करें।
4pip --version से package manager check करें।
5VS Code और Python extension install करें।

Important Commands

Terminal Commands
python --version
pip --version
python hello.py

hello.py बनाकर Run करें

hello.py
print("Hello from Python")
Hello from Python

Common Setup Problems

  • python is not recognized: PATH सही set नहीं है।
  • pip is not recognized: pip/PATH issue है।
  • File hello.py.txt बन गई: इसे .py extension से save करें।
  • Wrong folder में command run करना: पहले cd foldername use करें।

सारांश

Correct setup में Python 3, pip, working terminal command और VS Code जैसा editor होना चाहिए। hello.py run हो जाए तो Python learning start कर सकते हैं।

← Back to Python Tutorial