CodeLangs AISoftware Training Institute
Python for Beginners (Marathi)/Python Installation & Setup
Dashboard
Chapter 2 · Python Fundamentals

Python Installation & Setup

2,554
words
12
min read
30
practice items
Interactive learning

Practice lab

Question 1 of 12 00:00

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 करता येईल.
  • .py Python 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 सुरू करण्यासाठी तीन गोष्टी वेगळ्या आहेत:

TEXT
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मध्ये लिहिले:

PYTHON
print("Python setup successful!")

VS Codeने हा text edit केला.

Python extensionने VS Codeला हा Python code आहे हे समजण्यास मदत केली.

पण code execute केला:

TEXT
Python Interpreter

2. कोणती Python Version Install करायची?#

Course तयार करताना random किंवा preview version वापरणे योग्य नाही.

6 September 2026 रोजी current stable Python release:

TEXT
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मध्ये:

TEXT
3.14.7

ऐवजी:

TEXT
3.14.8

stable maintenance release उपलब्ध झाला, तर newer stable 3.14.x वापरणे योग्य आहे.

Stable vs Pre-release#

Version TypeMeaningBeginnerसाठी
StableProduction-ready official releaseRecommended
BetaTesting stageAvoid
Release CandidateFinal testing stageसामान्य learningसाठी avoid
Development buildDevelopment/testingAvoid

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 उघडा:

TEXT
python.org

Downloads 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 होऊ शकतात:

BASH
python
BASH
py
BASH
pymanager

Current Python documentationनुसार Python Install Manager install झाल्यानंतर python, py आणि pymanager commands उपलब्ध होतात.


Step 3 — Python Runtime Install / Launch करा#

नवीन setupवर terminal उघडा.

BASH
python

Current Python Install Manager setupमध्ये runtime installed नसल्यास हा command current default stable Python runtime install करण्याची प्रक्रिया सुरू करू शकतो.

तुमच्या machineवर installation workflow थोडा वेगळा दिसू शकतो, पण final goal हा आहे:

TEXT
Python stable runtime installed
        +
python / py command working

4. 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 उघडा.

BASH
python --version

Expected output course setupवर साधारण:

TEXT
Python 3.14.7

तुमच्या installation dateनुसार newer stable patch release असेल तर output वेगळा असू शकतो.


Alternative Windows Command#

BASH
py --version

तसेच installed runtimes पाहण्यासाठी current Python Install Managerमध्ये:

BASH
py list

वापरता येतो. Official Python documentation py list वापरून installed/current Python runtimes पाहता येतात असे सांगते.


macOS / Linux#

बर्‍याच Unix-like systemsमध्ये Python 3 साठी:

BASH
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.

उदाहरण:

BASH
python --version

python3#

Linux/macOS environmentsमध्ये Python 3 explicitly refer करण्यासाठी commonly वापरला जाणारा command.

BASH
python3 --version

py#

Modern Windows Python managementमध्ये Python runtime select किंवा launch करण्यासाठी उपयोगी command.

उदाहरण:

BASH
py

किंवा specific Python version:

BASH
py -V:3.14

Current Windows Python documentation specific runtime launch करण्यासाठी py -V:3.14 syntax support करते.


Important Understanding#

या commandsचे spelling पाठ करण्यापेक्षा हे समजा:

TEXT
Terminal Command
      ↓
Find / select Python interpreter
      ↓
Interpreter executes Python

6. PATH म्हणजे काय?#

Python install करताना PATH हा शब्द दिसू शकतो.

Definition#

PATH is an operating-system environment variable that contains directories used to locate executable commands.

मराठीत सांगायचे तर terminalमध्ये:

BASH
python

लिहिल्यावर operating systemला python executable कुठे आहे हे शोधावे लागते.

त्यासाठी PATHसारखी configuration मदत करते.


PATH Problem कसा दिसतो?#

उदाहरण:

TEXT
'python' is not recognized as an internal or external command

किंवा shellनुसार:

TEXT
command not found: python

याचा अर्थ नेहमीच Python install नाही असा नसतो.

Possible causes:

TEXT
Python runtime installed
        ↓
Command mapping / PATH incorrect
        ↓
Terminal cannot locate Python

पहिले Diagnosis काय कराल?#

Windowsवर:

BASH
py --version

try करा.

जर 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 करता येतात.

उदाहरण:

PYTHON
print("Python is working")

Output:

TEXT
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वरून:

BASH
python -m idlelib

IDLEचे 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#

PointIDLEVS Code
PurposePython learning/editorGeneral professional code editor
Setupतुलनेने simpleExtension configuration लागते
Python-specificYesExtensionद्वारे
Beginner experimentationExcellentExcellent after setup
Large projectsLimitedBetter suited
ExtensionsLimitedLarge extension ecosystem
Professional workflowBasicStrong
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मध्ये:

TEXT
Extensions

open करा.

Search करा:

TEXT
Python

Publisher तपासा:

TEXT
Microsoft

Extension 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 शिकण्याची गरज नाही.

फक्त एवढे लक्षात ठेवा:

TEXT
Python Interpreter → code execute करतो

Python Extension → VS Codeमध्ये Python workflow enable करते

Pylance → editor intelligence सुधारते

12. Python Extension Install केली म्हणजे Python Install झाले का?#

नाही.

हा खूप common misconception आहे.

TEXT
Install Python Extension
        ≠
Install Python Interpreter

Official 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 लावा.

उदाहरण:

TEXT
python-beginner

Folder structure:

TEXT
python-beginner/
└── first_program.py

VS Codeमध्ये:

TEXT
File
→ Open Folder
→ python-beginner

निवडा.

यामुळे पुढे multiple files organize करणे सोपे होते.


14. Python File तयार करणे#

VS Code Explorerमध्ये:

TEXT
New File

select करा.

File name:

TEXT
first_program.py

Definition#

A .py file is a source file containing Python code.

.py extensionमुळे file Python source file म्हणून ओळखली जाते.

उदाहरण:

TEXT
first_program.py

15. योग्य 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 असू शकतात.

उदाहरण:

TEXT
Python 3.13
Python 3.14
Virtual Environment

VS Codeला कोणता interpreter वापरायचा ते select करावे लागते.


Interpreter Select करण्याची Method#

Command Palette उघडा:

TEXT
Ctrl + Shift + P

Search:

TEXT
Python: Select Interpreter

Installed 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 लिहूया.

PYTHON
print("Python setup successful!")
या chapterमध्ये print() functionचे syntax, Python statements किंवा program structure शिकवले जात नाही. ते पुढच्या First Python Program chapterमध्ये शिकू.

आत्ता फक्त हे verify करायचे आहे:

TEXT
Can our environment execute a Python file successfully?

17. VS Codeमधून Python Program Run करणे#

File save करा.

उदाहरण:

TEXT
Ctrl + S

VS Code editorच्या top-rightमध्ये:

TEXT
Run Python File

play button दिसू शकतो.

तो click करा.

Official VS Code documentationनुसार Run Python File button selected interpreter वापरून current Python file terminalमध्ये execute करतो.

Expected output:

TEXT
Python setup successful!

जर output मिळाला तर flow successful आहे:

TEXT
Source File
     ↓
Selected Python Interpreter
     ↓
Program Execution
     ↓
Terminal Output

18. Terminalमधून Program Run करणे#

VS Code buttonवर पूर्णपणे depend राहू नका.

Terminal command वापरणेही शिका.

Windows:

BASH
python first_program.py

Possible alternative:

BASH
py first_program.py

macOS/Linux setupsमध्ये:

BASH
python3 first_program.py

Expected output:

TEXT
Python setup successful!

19. VS Code Run Button internally काय करतो?#

Beginner levelवर इतके समजणे पुरेसे आहे:

TEXT
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#

BASH
python --version

किंवा appropriate system command.

Result: Python stable version दिसली पाहिजे.

IDLE#

BASH
python -m idlelib

Environmentमध्ये IDLE उपलब्ध असल्यास launch झाले पाहिजे.

VS Code#

VS Code successfully open झाला पाहिजे.

Python Extension#

Extensionsमध्ये Microsoft Python extension installed दिसली पाहिजे.

Interpreter#

TEXT
Python: Select Interpreter

मध्ये valid interpreter select झाला पाहिजे.

Python File#

TEXT
first_program.py

तयार झाली पाहिजे.

Execution#

TEXT
Python setup successful!

output मिळाला पाहिजे.


Practical / Real-World Application#

एका companyमध्ये नवीन developer projectमध्ये join झाला आहे.

Repository clone केल्यानंतर code लगेच लिहिण्याआधी developer environment तयार करतो.

Typical flow:

TEXT
Required runtime version identify
        ↓
Runtime install
        ↓
Version verify
        ↓
Editor / IDE configure
        ↓
Correct interpreter select
        ↓
Simple execution test
        ↓
Project development start

Python learnerनेही हाच professional approach वापरावा.


Scenario#

तुमच्याकडे:

TEXT
Python 3.13
Python 3.14

दोन्ही installed आहेत.

VS Code चुकीने Python 3.13 select करते.

Terminalमध्ये:

BASH
python --version

Output:

TEXT
Python 3.14.7

पण VS Code status barमध्ये:

TEXT
Python 3.13.x

दिसते.

Analysis#

Problem Python installationची नाही.

Problem आहे:

TEXT
VS Code interpreter selection

Fix#

TEXT
Ctrl + Shift + P
→ Python: Select Interpreter
→ Python 3.14.x

Professional 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:

BASH
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#

TEXT
Python: Select Interpreter

Mistake 6 — File .py Extension विसरणे#

Incorrect:

TEXT
first_program.txt

Correct:

TEXT
first_program.py

Mistake 7 — File चुकीच्या Folderमधून Run करणे#

तुमची file आहे:

TEXT
C:\projects\python-beginner\first_program.py

पण terminal दुसऱ्या folderमध्ये आहे.

Command:

BASH
python first_program.py

file सापडणार नाही.

Better Understanding#

Terminalचा current working folder आणि Python file location match असणे आवश्यक आहे किंवा proper path द्यावा लागतो.


Mistake 8 — Error दिसताच Python Reinstall करणे#

प्रत्येक problem installationची नसते.

Possible layers:

TEXT
Installation
Command / PATH
Interpreter selection
File location
Filename
Extension
VS Code configuration

Diagnosis systematically करा.


Hands-On Practice#

Practice 1 — Installation Verification#

Problem#

Python तुमच्या systemवर correctly accessible आहे का verify करा.

Learner Task#

Terminalमध्ये appropriate version command run करा.

Hint 1#

Windows:

TEXT
python

आणि:

TEXT
--version

combine करा.

Solution#

BASH
python --version

Alternative Windows setup:

BASH
py --version

macOS/Linux:

BASH
python3 --version

Explanation#

हा command program execute न करता Python interpreterची version information दाखवतो.


Practice 2 — IDLE Launch करा#

Learner Task#

Command lineवरून IDLE सुरू करा.

Hint#

Python module execution syntax वापरले जाते.

Solution#

BASH
python -m idlelib

Explanation#

idlelib packageद्वारे IDLE application launch होते.


Practice 3 — VS Code Setup Verification#

खालील checklist स्वतः complete करा:

TEXT
[ ] VS Code installed
[ ] Microsoft Python extension installed
[ ] Python interpreter detected
[ ] Python 3.14.x selected
[ ] .py file created
[ ] File saved
[ ] Program executed
[ ] Output visible

Practice 4 — Wrong Interpreter Scenario#

Scenario#

Machineवर:

TEXT
Python 3.13
Python 3.14

installed आहेत.

VS Codeमध्ये Python 3.13 selected आहे.

Courseसाठी Python 3.14 वापरायचा आहे.

Learner Task#

Code reinstall न करता problem solve करा.

Hint#

Command Paletteमध्ये Python command शोधा.

Solution#

TEXT
Ctrl + Shift + P
→ Python: Select Interpreter
→ Python 3.14.x

Explanation#

Problem runtime availabilityची नव्हती; wrong runtime selected होता.


Practice 5 — First File Execution#

Folder तयार करा:

TEXT
python-beginner

File:

TEXT
setup_check.py

Code:

PYTHON
print("My Python environment is ready.")

File run करा.

Expected output:

TEXT
My Python environment is ready.

या exerciseचा उद्देश print() शिकणे नाही.

उद्देश आहे:

TEXT
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:

BASH
python --version

On some systems you may use:

BASH
python3 --version

or on Windows:

BASH
py --version

4. 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:

BASH
python -m idlelib

15. 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:

TEXT
Python: Select Interpreter

Then compare it with the interpreter/version being used in the terminal.


Quick Revision#

Python Development Setup#

TEXT
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, py commands relevant असू शकतात.
  • Linux/macOSमध्ये python3 common आहे.
  • IDLE हे Pythonचे Integrated Development and Learning Environment आहे.
  • VS Codeमध्ये correct interpreter select करणे महत्त्वाचे आहे.
  • Run Python File selected 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 करता येणे
  • .py file तयार करता येणे
  • 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मध्ये:

BASH
python --version

run केल्यावर:

TEXT
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मध्ये:

TEXT
Ctrl + Shift + P
→ Python: Select Interpreter
→ Installed Python 3.14.x interpreter

select करा.

नंतर file पुन्हा run करा.

Reasoning#

TEXT
python --version successful
        ↓
Python installation works
        ↓
VS Code says no interpreter
        ↓
VS Code configuration problem
        ↓
Select installed interpreter

हा approach random reinstall करण्यापेक्षा systematic diagnosis दाखवतो.