Python शिकायला सुरुवात करण्याआधी आपले development environment योग्य प्रकारे तयार असणे आवश्यक आहे.
या chapterमध्ये आपण Python language शिकण्यापेक्षा Python programs लिहिण्यासाठी आणि run करण्यासाठी लागणारा complete setup तयार करणार आहोत.
महत्त्वाचे: या chapterच्या शेवटी तुमच्या computerवर Python, VS Code आणि Python extension व्यवस्थित configure झालेले असतील आणि तुम्ही .py file successfully run करू शकाल.Learning Outcomes#
हा chapter पूर्ण केल्यानंतर तुम्हाला independently:
- Python तुमच्या computerवर install करता येईल.
- installed Python version verify करता येईल.
- Python interpreter म्हणजे काय हे beginner levelवर explain करता येईल.
- Python IDLE ओळखता आणि वापरता येईल.
- VS Code Python developmentसाठी setup करता येईल.
- Microsoft Python extension install करता येईल.
- VS Codeमध्ये योग्य Python interpreter select करता येईल.
.pyPython file तयार करता येईल.- terminal आणि VS Codeमधून Python program run करता येईल.
- common installation आणि interpreter-selection problems diagnose करता येतील.
python,python3,pyआणि--versionयांचा basic purpose समजेल.
1. Python Install करण्यापूर्वी Setup समजून घ्या#
Python development सुरू करण्यासाठी तीन गोष्टी वेगळ्या आहेत:
Your Python Development Setup
┌──────────────────────────┐
│ VS Code │
│ Code लिहिण्यासाठी editor │
└────────────┬─────────────┘
│
│ Python Extension
↓
┌──────────────────────────┐
│ Python Extension │
│ VS Code ला Python support│
└────────────┬─────────────┘
│
│ selects / uses
↓
┌──────────────────────────┐
│ Python Interpreter │
│ Python code execute करतो │
└──────────────────────────┘Definition#
A Python interpreter is a program that reads and executes Python code.
म्हणजे तुम्ही Pythonमध्ये लिहिलेला program execute करण्याचे actual काम Python interpreter करतो.
VS Code हा Python interpreter नाही.
Python extension सुद्धा Python interpreter नाही.
हे distinction समजणे खूप महत्त्वाचे आहे.
Official VS Code documentationसुद्धा Python setupमध्ये VS Code, Python extension आणि Python interpreter या तीन स्वतंत्र गोष्टी असल्याचे स्पष्ट करते.
उदाहरण#
तुम्ही VS Codeमध्ये लिहिले:
print("Python setup successful!")VS Codeने हा text edit केला.
Python extensionने VS Codeला हा Python code आहे हे समजण्यास मदत केली.
पण code execute केला:
Python Interpreter2. कोणती Python Version Install करायची?#
Course तयार करताना random किंवा preview version वापरणे योग्य नाही.
6 September 2026 रोजी current stable Python release:
Python 3.14.7आहे. Python 3.15.0rc2 उपलब्ध आहे, पण तो release candidate / pre-release आहे; final Python 3.15.0 release October 1, 2026 साठी scheduled आहे. Beginner learning environmentसाठी stable release वापरणे अधिक योग्य आहे.
Recommended for this course: Python 3.14.x stable series.
Courseचा मुख्य उद्देश specific patch version memorize करणे नाही.
उदाहरणार्थ futureमध्ये:
3.14.7ऐवजी:
3.14.8stable maintenance release उपलब्ध झाला, तर newer stable 3.14.x वापरणे योग्य आहे.
Stable vs Pre-release#
| Version Type | Meaning | Beginnerसाठी |
|---|---|---|
| Stable | Production-ready official release | Recommended |
| Beta | Testing stage | Avoid |
| Release Candidate | Final testing stage | सामान्य learningसाठी avoid |
| Development build | Development/testing | Avoid |
3. Python Install करणे — Windows#
Windowsमध्ये Python install करण्याची current official पद्धत समजून घेऊया.
Definition#
Python installation is the process of installing a Python runtime and making it available for executing Python programs.
सोप्या भाषेत, Python install केल्यानंतर computerला .py programs execute करण्याची capability मिळते.
Current Python documentation Windows usersना Python Install Manager वापरण्याची recommendation देते. तो python.org किंवा Microsoft Storeमधून install करता येतो.
Step 1 — Official Python Website उघडा#
Browserमध्ये official Python website उघडा:
python.orgDownloads sectionमध्ये जा.
Third-party random websitesवरून Python installer download करू नका.
Best Practice: Programming runtimes आणि development tools शक्यतो त्यांच्या official sourceमधून install करा.
Step 2 — Python Install Manager Install करा#
Current Windows installation flowमध्ये Python Install Manager वापरता येतो.
Installer download करून install करा.
Installation complete झाल्यानंतर खालील commands available होऊ शकतात:
pythonpypymanagerCurrent Python documentationनुसार Python Install Manager install झाल्यानंतर python, py आणि pymanager commands उपलब्ध होतात.
Step 3 — Python Runtime Install / Launch करा#
नवीन setupवर terminal उघडा.
pythonCurrent Python Install Manager setupमध्ये runtime installed नसल्यास हा command current default stable Python runtime install करण्याची प्रक्रिया सुरू करू शकतो.
तुमच्या machineवर installation workflow थोडा वेगळा दिसू शकतो, पण final goal हा आहे:
Python stable runtime installed
+
python / py command working4. Python Version Check करणे#
Installation झाल्यानंतर फक्त installer बंद झाला म्हणून setup successful आहे असे assume करू नका.
Installation verify करा.
Definition#
Version verification confirms which Python interpreter is available through a command on your system.
म्हणजे terminalमधून Python command चालत आहे का आणि कोणती version execute होत आहे हे आपण पाहतो.
Windows#
Command Prompt, PowerShell किंवा VS Code terminal उघडा.
python --versionExpected output course setupवर साधारण:
Python 3.14.7तुमच्या installation dateनुसार newer stable patch release असेल तर output वेगळा असू शकतो.
Alternative Windows Command#
py --versionतसेच installed runtimes पाहण्यासाठी current Python Install Managerमध्ये:
py listवापरता येतो. Official Python documentation py list वापरून installed/current Python runtimes पाहता येतात असे सांगते.
macOS / Linux#
बर्याच Unix-like systemsमध्ये Python 3 साठी:
python3 --versionवापरला जातो.
Official VS Code Python setup guidance Linux/macOSसाठी python3 --version, आणि Windowsसाठी py -3 --version वापरून installation verify करण्याचे उदाहरण देते.
5. python, python3 आणि py मध्ये काय फरक आहे?#
Beginnerला हा भाग सुरुवातीला confusing वाटतो.
python#
Python interpreter launch किंवा Python program execute करण्यासाठी वापरला जाणारा command.
उदाहरण:
python --versionpython3#
Linux/macOS environmentsमध्ये Python 3 explicitly refer करण्यासाठी commonly वापरला जाणारा command.
python3 --versionpy#
Modern Windows Python managementमध्ये Python runtime select किंवा launch करण्यासाठी उपयोगी command.
उदाहरण:
pyकिंवा specific Python version:
py -V:3.14Current Windows Python documentation specific runtime launch करण्यासाठी py -V:3.14 syntax support करते.
Important Understanding#
या commandsचे spelling पाठ करण्यापेक्षा हे समजा:
Terminal Command
↓
Find / select Python interpreter
↓
Interpreter executes Python6. PATH म्हणजे काय?#
Python install करताना PATH हा शब्द दिसू शकतो.
Definition#
PATH is an operating-system environment variable that contains directories used to locate executable commands.
मराठीत सांगायचे तर terminalमध्ये:
pythonलिहिल्यावर operating systemला python executable कुठे आहे हे शोधावे लागते.
त्यासाठी PATHसारखी configuration मदत करते.
PATH Problem कसा दिसतो?#
उदाहरण:
'python' is not recognized as an internal or external commandकिंवा shellनुसार:
command not found: pythonयाचा अर्थ नेहमीच Python install नाही असा नसतो.
Possible causes:
Python runtime installed
↓
Command mapping / PATH incorrect
↓
Terminal cannot locate Pythonपहिले Diagnosis काय कराल?#
Windowsवर:
py --versiontry करा.
जर py work करत असेल पण python work करत नसेल, तर installation पूर्णपणे missing नसण्याची शक्यता आहे.
Current Python documentation Windowsमध्ये command problemsसाठी App Execution Aliases आणि PATH configuration तपासण्याची guidance देते.
Professional Habit: Error दिसल्यावर लगेच reinstall करू नका. प्रथम समस्या installationची आहे, PATHची आहे की interpreter-selectionची आहे ते identify करा.
7. Python IDLE#
Python install झाल्यानंतर beginnerला Python quickly explore करण्यासाठी IDLE उपयोगी पडू शकते.
Definition#
IDLE is Python's Integrated Development and Learning Environment.
IDLE हे Pythonसोबत वापरण्यासाठी तयार केलेले lightweight editor आणि interactive shell environment आहे.
Python documentationनुसार IDLE सामान्यतः Python installationsसोबत bundled असते.
IDLEमध्ये मुख्यतः दोन भाग दिसतात#
1. Shell#
Shellमध्ये Python instructions interactively execute करता येतात.
उदाहरण:
print("Python is working")Output:
Python is workingया chapterमध्ये print() चे syntax आपण शिकत नाही; आपण ते फक्त installation test म्हणून वापरत आहोत.
2. Editor#
Editorमध्ये .py file तयार करून complete Python program save आणि run करता येतो.
IDLE Launch करणे#
Systemवर IDLE shortcut उपलब्ध असल्यास Start Menu/Searchमधून launch करू शकता.
किंवा Python command-lineवरून:
python -m idlelibIDLEचे official command-line syntax python -m idlelib आहे.
IDLE कधी वापरावे?#
IDLE useful आहे:
- Python installation test करण्यासाठी
- beginner experimentationसाठी
- simple code quickly execute करण्यासाठी
- lightweight learning environment म्हणून
पण professional development workflowसाठी आपण पुढे VS Code वापरणार आहोत.
8. IDLE vs VS Code#
| Point | IDLE | VS Code |
|---|---|---|
| Purpose | Python learning/editor | General professional code editor |
| Setup | तुलनेने simple | Extension configuration लागते |
| Python-specific | Yes | Extensionद्वारे |
| Beginner experimentation | Excellent | Excellent after setup |
| Large projects | Limited | Better suited |
| Extensions | Limited | Large extension ecosystem |
| Professional workflow | Basic | Strong |
Course Recommendation: IDLE समजून घ्या, पण पुढील practical codingसाठी VS Code वापरा.
9. VS Code Setup#
Definition#
Visual Studio Code is a source-code editor that can be extended with language-specific development tools.
VS Code अनेक programming languagesसाठी वापरता येतो.
तो Python language स्वतः execute करत नाही.
Python execute करण्यासाठी अजूनही Python interpreter आवश्यक आहे.
VS Code Install करणे#
Official Visual Studio Code websiteवरून installer download करा.
Install करताना default recommended options beginnerसाठी सामान्यतः पुरेशा असतात.
Installation झाल्यानंतर VS Code open करा.
10. Python Extension Install करणे#
VS Code open केल्यानंतर Python development support add करायचे आहे.
Definition#
The Python extension adds Python development features to Visual Studio Code.
यामुळे VS Codeमध्ये Python-related features उपलब्ध होतात, जसे:
- Python interpreter selection
- running Python files
- IntelliSense integration
- debugging integration
- code navigation
- Python-specific editor support
Official Microsoft Python extension Python developmentसाठी VS Codeमध्ये language support आणि related integration पुरवते.
Python Extension Install करण्याचे Steps#
VS Codeच्या left sidebarमध्ये:
Extensionsopen करा.
Search करा:
PythonPublisher तपासा:
MicrosoftExtension install करा.
Important: Random similarly named Python extensions install करण्याऐवजी official Microsoft Python extension निवडा.
11. Pylance म्हणजे काय?#
Python extension setupमध्ये Pylance दिसू शकते.
Definition#
Pylance provides performant Python language support in Visual Studio Code.
Pylance code completion, type information आणि editor intelligenceसाठी मदत करते.
Microsoft documentationनुसार Pylance हे VS Codeमधील default Python language support आहे आणि Python extensionसोबत optional dependency म्हणून install होऊ शकते.
या beginner chapterमध्ये Pylance internals शिकण्याची गरज नाही.
फक्त एवढे लक्षात ठेवा:
Python Interpreter → code execute करतो
Python Extension → VS Codeमध्ये Python workflow enable करते
Pylance → editor intelligence सुधारते12. Python Extension Install केली म्हणजे Python Install झाले का?#
नाही.
हा खूप common misconception आहे.
Install Python Extension
≠
Install Python InterpreterOfficial VS Code documentation स्पष्टपणे सांगते की Python extensionमध्ये Python interpreter समाविष्ट नसतो; interpreter वेगळा install करावा लागतो.
चुकीची assumption#
"मी VS Codeमध्ये Python extension install केली आहे, त्यामुळे माझ्याकडे Python आहे."
Correct understanding#
Python extension VS Codeला Python-aware बनवते.
Actual Python program execute करण्यासाठी machineवर Python interpreter आवश्यक आहे.
13. Project Folder तयार करणे#
Coding सुरू करण्याआधी files random Desktop locationsमध्ये ठेवण्यापेक्षा dedicated project folder तयार करण्याची habit लावा.
उदाहरण:
python-beginnerFolder structure:
python-beginner/
└── first_program.pyVS Codeमध्ये:
File
→ Open Folder
→ python-beginnerनिवडा.
यामुळे पुढे multiple files organize करणे सोपे होते.
14. Python File तयार करणे#
VS Code Explorerमध्ये:
New Fileselect करा.
File name:
first_program.pyDefinition#
A .py file is a source file containing Python code.
.py extensionमुळे file Python source file म्हणून ओळखली जाते.
उदाहरण:
first_program.py15. योग्य Python Interpreter Select करणे#
ही VS Code setupमधील सर्वात महत्त्वाच्या stepsपैकी एक आहे.
Definition#
Interpreter selection tells VS Code which installed Python interpreter should be used for the current workspace.
तुमच्या computerवर multiple Python versions असू शकतात.
उदाहरण:
Python 3.13
Python 3.14
Virtual EnvironmentVS Codeला कोणता interpreter वापरायचा ते select करावे लागते.
Interpreter Select करण्याची Method#
Command Palette उघडा:
Ctrl + Shift + PSearch:
Python: Select InterpreterInstalled Python 3.14.x interpreter निवडा.
Official VS Code documentationमध्ये Python: Select Interpreter command वापरून environment/interpreter select करण्याची recommendation आहे.
Selected interpreter VS Code status barमध्ये दिसू शकतो.
16. First Python Program तयार करणे#
आता setup verify करण्यासाठी minimal program लिहूया.
print("Python setup successful!")या chapterमध्ये print() functionचे syntax, Python statements किंवा program structure शिकवले जात नाही. ते पुढच्या First Python Program chapterमध्ये शिकू.आत्ता फक्त हे verify करायचे आहे:
Can our environment execute a Python file successfully?17. VS Codeमधून Python Program Run करणे#
File save करा.
उदाहरण:
Ctrl + SVS Code editorच्या top-rightमध्ये:
Run Python Fileplay button दिसू शकतो.
तो click करा.
Official VS Code documentationनुसार Run Python File button selected interpreter वापरून current Python file terminalमध्ये execute करतो.
Expected output:
Python setup successful!जर output मिळाला तर flow successful आहे:
Source File
↓
Selected Python Interpreter
↓
Program Execution
↓
Terminal Output18. Terminalमधून Program Run करणे#
VS Code buttonवर पूर्णपणे depend राहू नका.
Terminal command वापरणेही शिका.
Windows:
python first_program.pyPossible alternative:
py first_program.pymacOS/Linux setupsमध्ये:
python3 first_program.pyExpected output:
Python setup successful!19. VS Code Run Button internally काय करतो?#
Beginner levelवर इतके समजणे पुरेसे आहे:
Click "Run Python File"
↓
VS Code checks selected interpreter
↓
Terminal opens / is reused
↓
Python interpreter receives file path
↓
Python file executes
↓
Output appears in terminalयामुळे एक महत्त्वाचा concept clear होतो:
Run button हा magic नाही. शेवटी Python interpreterच program execute करतो.
20. Complete Setup Verification Checklist#
तुमचा setup पूर्ण झाला आहे का हे खालील checklistने verify करा.
Python#
python --versionकिंवा appropriate system command.
Result: Python stable version दिसली पाहिजे.
IDLE#
python -m idlelibEnvironmentमध्ये IDLE उपलब्ध असल्यास launch झाले पाहिजे.
VS Code#
VS Code successfully open झाला पाहिजे.
Python Extension#
Extensionsमध्ये Microsoft Python extension installed दिसली पाहिजे.
Interpreter#
Python: Select Interpreterमध्ये valid interpreter select झाला पाहिजे.
Python File#
first_program.pyतयार झाली पाहिजे.
Execution#
Python setup successful!output मिळाला पाहिजे.
Practical / Real-World Application#
एका companyमध्ये नवीन developer projectमध्ये join झाला आहे.
Repository clone केल्यानंतर code लगेच लिहिण्याआधी developer environment तयार करतो.
Typical flow:
Required runtime version identify
↓
Runtime install
↓
Version verify
↓
Editor / IDE configure
↓
Correct interpreter select
↓
Simple execution test
↓
Project development startPython learnerनेही हाच professional approach वापरावा.
Scenario#
तुमच्याकडे:
Python 3.13
Python 3.14दोन्ही installed आहेत.
VS Code चुकीने Python 3.13 select करते.
Terminalमध्ये:
python --versionOutput:
Python 3.14.7पण VS Code status barमध्ये:
Python 3.13.xदिसते.
Analysis#
Problem Python installationची नाही.
Problem आहे:
VS Code interpreter selectionFix#
Ctrl + Shift + P
→ Python: Select Interpreter
→ Python 3.14.xProfessional lesson#
Installed version आणि currently selected interpreter नेहमी एकच असेल असे assume करू नका.
Common Mistakes & Misconceptions#
Mistake 1 — Python Extension म्हणजे Python#
Misconception#
Python extension install केली म्हणजे Python install झाले.
Why it sounds believable#
Extensionचे नावच "Python" आहे.
Correct Understanding#
Extension VS Codeला Python development features देते.
Interpreter वेगळा install करावा लागतो.
Mistake 2 — VS Code Python execute करते#
Misconception#
Run button click केल्यावर VS Code Python program execute करते.
Correct Understanding#
VS Code execution workflow सुरू करते, पण actual code selected Python interpreter execute करतो.
Mistake 3 — Latest म्हणजे Pre-release Install करणे#
Misconception#
सर्वात मोठा version number दिसतो म्हणजे तो install करणे best.
Correct Understanding#
3.15.0rc2 सारखे version stable final release नसू शकतात.
Beginner courseसाठी stable release निवडा.
Mistake 4 — Version Check न करणे#
Installation झाल्यावर लगेच coding सुरू करणे चुकीचे नाही, पण verification न केल्याने पुढे confusing errors येऊ शकतात.
Always run:
python --versionकिंवा appropriate platform command.
Mistake 5 — Wrong Interpreter Select करणे#
Symptom#
Code एका terminalमध्ये चालतो पण VS Codeमध्ये unexpected behavior दिसते.
Possible Root Cause#
Different interpreter selected आहे.
Diagnosis#
Terminal version check करा आणि VS Code interpreter compare करा.
Fix#
Python: Select InterpreterMistake 6 — File .py Extension विसरणे#
Incorrect:
first_program.txtCorrect:
first_program.pyMistake 7 — File चुकीच्या Folderमधून Run करणे#
तुमची file आहे:
C:\projects\python-beginner\first_program.pyपण terminal दुसऱ्या folderमध्ये आहे.
Command:
python first_program.pyfile सापडणार नाही.
Better Understanding#
Terminalचा current working folder आणि Python file location match असणे आवश्यक आहे किंवा proper path द्यावा लागतो.
Mistake 8 — Error दिसताच Python Reinstall करणे#
प्रत्येक problem installationची नसते.
Possible layers:
Installation
Command / PATH
Interpreter selection
File location
Filename
Extension
VS Code configurationDiagnosis systematically करा.
Hands-On Practice#
Practice 1 — Installation Verification#
Problem#
Python तुमच्या systemवर correctly accessible आहे का verify करा.
Learner Task#
Terminalमध्ये appropriate version command run करा.
Hint 1#
Windows:
pythonआणि:
--versioncombine करा.
Solution#
python --versionAlternative Windows setup:
py --versionmacOS/Linux:
python3 --versionExplanation#
हा command program execute न करता Python interpreterची version information दाखवतो.
Practice 2 — IDLE Launch करा#
Learner Task#
Command lineवरून IDLE सुरू करा.
Hint#
Python module execution syntax वापरले जाते.
Solution#
python -m idlelibExplanation#
idlelib packageद्वारे IDLE application launch होते.
Practice 3 — VS Code Setup Verification#
खालील checklist स्वतः complete करा:
[ ] VS Code installed
[ ] Microsoft Python extension installed
[ ] Python interpreter detected
[ ] Python 3.14.x selected
[ ] .py file created
[ ] File saved
[ ] Program executed
[ ] Output visiblePractice 4 — Wrong Interpreter Scenario#
Scenario#
Machineवर:
Python 3.13
Python 3.14installed आहेत.
VS Codeमध्ये Python 3.13 selected आहे.
Courseसाठी Python 3.14 वापरायचा आहे.
Learner Task#
Code reinstall न करता problem solve करा.
Hint#
Command Paletteमध्ये Python command शोधा.
Solution#
Ctrl + Shift + P
→ Python: Select Interpreter
→ Python 3.14.xExplanation#
Problem runtime availabilityची नव्हती; wrong runtime selected होता.
Practice 5 — First File Execution#
Folder तयार करा:
python-beginnerFile:
setup_check.pyCode:
print("My Python environment is ready.")File run करा.
Expected output:
My Python environment is ready.या exerciseचा उद्देश print() शिकणे नाही.
उद्देश आहे:
Editor → File → Interpreter → Execution → Outputहा complete workflow verify करणे.
Interview Preparation#
1. What is a Python interpreter?
A Python interpreter is the program that reads and executes Python code.
What the interviewer is testing: Whether you understand the difference between writing Python code and executing it.
Common weak answer: “VS Code is the Python interpreter.”
VS Code is an editor. The selected Python interpreter performs the actual execution.
2. Does installing the Python extension in VS Code install Python itself?
No. The Python extension adds Python development support to VS Code, but the Python interpreter must be installed separately.
What the interviewer is testing: Basic development-environment understanding.
3. How can you check the installed Python version?
A common command is:
python --versionOn some systems you may use:
python3 --versionor on Windows:
py --version4. What is IDLE in Python?
IDLE is Python's Integrated Development and Learning Environment. It provides an interactive Python shell and a simple editor.
5. What is the purpose of Python: Select Interpreter in VS Code?
It allows you to choose which installed Python interpreter or environment VS Code should use for the current workspace.
6. Can multiple Python versions exist on the same machine?
Yes. A system can have multiple Python versions installed. The developer or development tool must use the appropriate interpreter for the project.
7. What does the .py extension represent?
.py is the standard filename extension used for Python source files.
8. What is PATH in the context of Python installation?
PATH is an operating-system environment variable containing directories that the command shell searches for executable programs.
If Python's executable or command alias cannot be resolved correctly, typing python may fail even when a Python installation exists.
9. Why should you verify Python after installation?
Verification confirms that the Python command is accessible and tells you which Python version is being used.
It helps detect installation, PATH, command-alias, or version-selection issues early.
10. What actually happens when you click “Run Python File” in VS Code?
VS Code uses the selected Python interpreter and runs the current Python file through it in a terminal.
The interpreter performs the actual Python execution.
11. What is the difference between VS Code and the Python interpreter?
VS Code is primarily a source-code editor.
The Python interpreter is the runtime program responsible for executing Python code.
12. Why is selecting the correct Python interpreter important?
Different interpreters may represent different Python versions or environments.
Selecting the wrong interpreter can cause version mismatches, unavailable packages, or different runtime behavior.
13. Should a beginner normally choose a stable Python release or a release candidate?
A beginner should normally choose a stable Python release unless there is a specific reason to test a pre-release version.
Stable releases are the appropriate default for normal learning and development.
14. How can you start IDLE from the command line?
A supported command is:
python -m idlelib15. A Python program works from one terminal but VS Code uses another Python version. What should you check first?
Check the interpreter selected in VS Code using:
Python: Select InterpreterThen compare it with the interpreter/version being used in the terminal.
Quick Revision#
Python Development Setup#
VS Code
↓
Python Extension
↓
Selected Python Interpreter
↓
Python Program
↓
Outputलक्षात ठेवायचे मुख्य points#
- Python interpreter actual code execute करतो.
- VS Code editor आहे.
- Python extension interpreter नाही.
.pyम्हणजे Python source file.- Python install केल्यानंतर version verify करा.
- Windowsमध्ये
python,pycommands relevant असू शकतात. - Linux/macOSमध्ये
python3common आहे. - IDLE हे Pythonचे Integrated Development and Learning Environment आहे.
- VS Codeमध्ये correct interpreter select करणे महत्त्वाचे आहे.
Run Python Fileselected interpreter वापरतो.- Stable Python release beginnerसाठी default choice असावी.
- Error आल्यावर installation, PATH, interpreter आणि file location वेगवेगळे diagnose करा.
You Should Now Be Able To#
Chapter पूर्ण केल्यानंतर तुम्हाला:
- stable Python installation निवडता येणे
- Python install करता येणे
- Python version verify करता येणे
- interpreter म्हणजे काय explain करता येणे
- PATHचा basic purpose सांगता येणे
- IDLE launch करता येणे
- IDLE आणि VS Codeमधील basic difference सांगता येणे
- VS Code install आणि configure करता येणे
- official Python extension identify करता येणे
- Python interpreter select करता येणे
.pyfile तयार करता येणे- VS Codeमधून program run करता येणे
- terminalमधून Python file execute करता येणे
- common setup errorsचे basic diagnosis करता येणे
- interviewमध्ये Python development setupविषयी basic questions confidently answer करता येणे
Final Challenge#
Scenario#
तुम्ही नवीन laptopवर Python शिकायला सुरुवात करत आहात.
तुम्ही VS Code आणि Python extension install केली.
setup_check.py file तयार केली.
पण VS Codeमध्ये message येतो की Python interpreter select केलेला नाही.
Terminalमध्ये:
python --versionrun केल्यावर:
Python 3.14.7दिसते.
Learner Task#
Problem कुठे आहे ते identify करा आणि correct action सांगा.
Hint 1#
Python installed आहे का?
Hint 2#
Terminal version command successful आहे.
Hint 3#
VS Codeला installed interpreter माहित असणे आणि तो workspaceसाठी selected असणे या वेगळ्या गोष्टी आहेत.
Solution#
Python reinstall करण्याची गरज नाही.
Python interpreter already available आहे.
VS Codeमध्ये:
Ctrl + Shift + P
→ Python: Select Interpreter
→ Installed Python 3.14.x interpreterselect करा.
नंतर file पुन्हा run करा.
Reasoning#
python --version successful
↓
Python installation works
↓
VS Code says no interpreter
↓
VS Code configuration problem
↓
Select installed interpreterहा approach random reinstall करण्यापेक्षा systematic diagnosis दाखवतो.