Python is one of the most beginner-friendly programming languages and is widely used in web development, data science, AI, and automation. Before you can start coding, you need to install Python on your system. This guide will show you how to install Python on Windows, Mac, and Linux step-by-step.
Step 1: Check if Python is Already Installed
Before installing, check if Python is already installed on your system:
-
Open Command Prompt (Windows) or Terminal (Mac/Linux).
-
Type:
or
If Python is installed, you’ll see the version number. If not, follow the steps below for your operating system.
Step 2: Installing Python on Windows
-
Download Python Installer:
-
Go to the official Python website
-
Click “Download Python 3.x.x” (latest version).
-
-
Run the Installer:
-
Double-click the downloaded
.exefile. -
Important: Check the box “Add Python to PATH” at the bottom.
-
Click Install Now.
-
-
Verify Installation:
-
Open Command Prompt and type:
-
-
You should see the installed Python version.
Tip: If you plan to use Python for coding challenges, scripts, or web development, installing IDLE (comes with Python) or VS Code is recommended for writing code.
Step 3: Installing Python on Mac
-
Using Homebrew (Recommended):
-
Open Terminal and type:
-
-
Alternative – Direct Download:
-
Go to python.org and download the Mac installer.
-
Follow the installation steps.
-
-
Verify Installation:
-
Mac uses
python3instead ofpythonin Terminal.
Tip: For Mac users, it’s recommended to use Homebrew for easier package management later.
Step 4: Installing Python on Linux (Ubuntu/Debian)
-
Update Package List:
-
Install Python 3:
-
Verify Installation:
For Fedora/RedHat:
Tip: Linux users often need pip (Python package manager) as well:
Step 5: Set Up a Code Editor (Optional but Recommended)
Once Python is installed, you’ll need an editor to write code:
-
VS Code: Lightweight, free, and beginner-friendly.
-
PyCharm: Great for larger Python projects.
-
IDLE: Comes pre-installed with Python, simple and easy.
Step 6: Test Your First Python Script
-
Open your terminal or editor.
-
Create a new file named
hello.py. -
Type the following code:
-
Run it:
Expected Output:
Congratulations! 🎉 You now have Python installed and running on your system. You are ready to start learning Python coding.
Extra Tips for Beginners:
-
Always install the latest Python version for better support and features.
-
Keep your Python environment organized using virtual environments (
venv). -
Practice running small scripts daily to become familiar with Python basics.
Follow me on Instagram - @ut.dev

Comments
Post a Comment