Install Python on Windows
Python tutorial · PySpark.in
Step 1: Check if Python is already installed
- Press Windows + R on your keyboard
- Type cmd and press Enter → this opens Command Prompt
- In the black window, type:
- python --version
- Press Enter
What do you see?
- If you see something like:
- Python 3.11.7
Then Python is already installed (you can skip to Step 5).
- If you see:
- 'python' is not recognized as an internal or external command
Then Python is not installed → continue to the next step.
Step 2: Download Python for Windows
- Open your browser (Chrome / Edge / Firefox)
- Go to the official Python website: https://www.python.org
- On the homepage, you’ll see a big yellow button:
“Download Python 3.x.x”
(The version may change, e.g. 3.13.0)
- Click that button → a file like python-3.x.x-amd64.exe will start downloading.
Note: Always download Python from the official website, not random sites.
Step 3: Run the Python installer
- When the download finishes, open your Downloads folder.
- Double-click the file:
- python-3.x.x-amd64.exe
- The Python Setup window will open.
Step 4: Important – “Add Python to PATH”
This is the most important step for beginners.
On the first installation screen:
- At the bottom, you will see:
“Add Python 3.x to PATH”
- Tick/check this box ✔
- Now click “Install Now”
If you forget to tick this, python won’t work in Command Prompt.
Step 5: Wait for installation to finish
- The installer will show messages like “Installing” or “Setup Progress”
- When it’s done, you will see:
“Setup was successful”
- Click Close.
Python is now installed on your system
Step 6: Verify Python installation
Let’s confirm everything is working.
- Open Command Prompt again:
- Press Windows + R → type cmd → press Enter
- Type:
- python --version
- Press Enter
You should see something like:
- Python 3.11.7
Now check pip (Python’s package manager):
- pip --version
If you see a version (e.g. pip 24.0), then pip is also installed
Step 7: Run your first Python program (Hello, World!)
Option 1 – Using Python interactive shell
- In Command Prompt, type:
- python
- You will see something like:
- Python 3.11.7 (tags/...)
- >>>
- At the >>> prompt, type:
print("Hello, Python from Windows!")
More Python tutorials
- What is Python and Why is it used for Data Science and Data Engineering?
- How Does Python Work in the Backend? Internal Working of Python
- Top 30 Python Interview Questions for Data Science
- 3-Month Python Roadmap to Excel in Data Science and Machine Learning
- Python Data Types Explained – A Beginner’s Guide
- test
All tutorials · Try the free PySpark compiler · Practice challenges