Skip to main content

How to Install Python on Windows, Mac, and Linux (Step-by-Step)

 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:

python --version

or

python3 --version

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

  1. Download Python Installer:

  2. Run the Installer:

    • Double-click the downloaded .exe file.

    • Important: Check the box “Add Python to PATH” at the bottom.

    • Click Install Now.

  3. Verify Installation:

    • Open Command Prompt and type:

python --version
  • 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

  1. Using Homebrew (Recommended):

    • Open Terminal and type:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew install python
  1. Alternative – Direct Download:

    • Go to python.org and download the Mac installer.

    • Follow the installation steps.

  2. Verify Installation:

python3 --version
  • Mac uses python3 instead of python in Terminal.

Tip: For Mac users, it’s recommended to use Homebrew for easier package management later.


Step 4: Installing Python on Linux (Ubuntu/Debian)

  1. Update Package List:

sudo apt update
  1. Install Python 3:

sudo apt install python3
  1. Verify Installation:

python3 --version

For Fedora/RedHat:

sudo yum install python3

Tip: Linux users often need pip (Python package manager) as well:

sudo apt install python3-pip

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

  1. Open your terminal or editor.

  2. Create a new file named hello.py.

  3. Type the following code:

print("Hello, Python!")
  1. Run it:

python hello.py # Windows python3 hello.py # Mac/Linux

Expected Output:

Hello, Python!

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

Popular posts from this blog

Top 5 Free Websites for Coding Challenges in 2025

 Practicing coding through challenges is one of the fastest ways to improve your programming skills . Coding challenges help you think logically, solve problems efficiently, and prepare for interviews . In 2025, many websites offer free coding challenges suitable for beginners and intermediate developers. Here’s a detailed list of the top 5 free websites for coding challenges : 1. freeCodeCamp Overview: freeCodeCamp is a completely free platform for learning programming and web development. It provides interactive challenges, projects, and certifications . Key Features: Over 1,000 coding exercises covering HTML, CSS, JavaScript, Python, and more. Guided projects to build real-world applications. Active community and forums for help. Why it’s great: Ideal for beginners who want structured learning and practice simultaneously. Tip: Complete the projects for a hands-on coding portfolio. 2. HackerRank Overview: HackerRank is widely used by beginners and prof...

Top 5 Free Python Resources for Beginners in 2025

Python is one of the most popular programming languages in 2025, thanks to its simplicity, versatility, and widespread use in web development, AI, data science, automation, and more. Whether you’re a complete beginner or want to sharpen your coding skills, having the right resources is crucial. Luckily, there are several high-quality, free resources that can help you learn Python without spending a penny. Here are the top 5 free Python resources for beginners in 2025: 1. Python.org Official Tutorials The official Python documentation is a great starting point for beginners. It includes step-by-step tutorials that cover everything from the basics to intermediate concepts. Why it’s good: Up-to-date with the latest Python version. Covers essential Python syntax, functions, loops, and modules. Includes exercises and examples. Tip: Start with the “Beginner’s Guide” section and practice the examples in your own Python environment. 2. W3Schools Python Tutorial W3Schools is famou...

5 VS Code Extensions Every Developer Needs in 2025

Visual Studio Code (VS Code) is one of the most popular code editors for developers worldwide. Its power lies not only in its lightweight interface but also in its extensions , which allow you to customize and enhance your coding workflow. Whether you are a beginner or a professional developer, installing the right VS Code extensions can save time, reduce errors, and make coding more enjoyable. Here are 5 essential VS Code extensions you should install in 2025 : 1. Python (Microsoft) Purpose: Adds rich support for Python development, including IntelliSense, debugging, and code linting. Key Features: Autocomplete and code suggestions. Debugging support for Python scripts. Integration with Jupyter Notebooks. Linting with Pylint or Flake8 for error checking. Why it’s essential: Python developers can write cleaner code, debug faster, and manage projects efficiently. Installation Tip: Go to Extensions → Search “Python” → Install (published by Microsoft). 2. Pylance...