🟢 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
| 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.
Python Installation और Setup
Python programs लिखने से पहले computer में Python सही तरीके से install होना चाहिए। Setup का मतलब है Python install करना, version check करना, PATH set करना, editor choose करना और first .py file run करना।
Installation Steps
| Step | Action |
|---|---|
| 1 | Python 3 download करें। |
| 2 | Installation के time Add Python to PATH tick करें। |
| 3 | Command Prompt/Terminal में python --version check करें। |
| 4 | pip --version से package manager check करें। |
| 5 | VS 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बन गई: इसे.pyextension से save करें। - Wrong folder में command run करना: पहले
cd foldernameuse करें।
सारांश
Correct setup में Python 3, pip, working terminal command और VS Code जैसा editor होना चाहिए। hello.py run हो जाए तो Python learning start कर सकते हैं।