TechieTrend

Setting Up Python: Step by Step

If you are starting learning python for the first time to master Python programming. The very first thing you need to do is to download and Install Python for Windows, MacOS, Ubuntu Linux. In this post you will learn how to download and Install Python for Windows, MacOS, Ubuntu Linux and how to open Python Integrated Development and Learning Environment.  

Check Python: Windows

You will find several ways to install python. But before starting download Python We will first check if it’s already available in your machine or not. In this section we will check whether the Python is already installed or not in your machine. To check for python in your machine.

Check Python Version: Windows

To check whether the latest version of python is already available or not in your Machine follow these steps.

  1. Open Command Prompt (CMD)
  • Press Win + R to open the Run dialog box.
  • Type cmd and press Enter or click OK.

python –version gives you the version which is downloaded in your machine.  If there is no python downloaded in your machine, it will show some error like this. 

That means you need to download Python in your machine. 

Python Installation Options on Windows

You’ll find number of ways to download and install Python if you use a Windows Machine. We will cover five main options to install Python on Windows Machine. 

  1. The Official Python installer for WindowsThis approach involves downloading the Python installer directly from the Python.org website. It’s recommended for intermediate and advanced developers who need more control during the setup process, such as choosing specific features, customizing installation paths, and adding environment variables manually.
  2. The Microsoft Store :The quickest and simplest installation option on Windows involves using the built-in Microsoft Store app. This is recommended for beginner Python programmers looking for an easy-to-set-up interactive experience. It requires no manual PATH configuration and can be installed with a single click.

  3. The Windows Package Manager (winget): This command-line approach uses Windows’ built-in package manager (winget) to install Python. It’s best suited for developers, power users, and IT professionals who prefer automation or want to script installations. It is especially useful in enterprise or setup script scenarios.

  4. The Windows Subsystem for Linux (WSL): The WSL allows you to run a Linux environment directly on Windows, including a full Python development environment. This method is perfect for developers who want a Linux-like experience without dual-booting or using a virtual machine. It’s recommended for advanced users, especially those working with tools or libraries more stable on Linux.

  5. Anaconda Distribution: The Anaconda distribution is a third-party package that bundles Python with a wide range of pre-installed libraries and tools for data science, machine learning, and scientific computing. It includes conda, a powerful environment manager. Recommended for data analysts, scientists, and ML enthusiasts who need access to tools like NumPy, Pandas, Jupyter, etc., right out of the box.

How to Install Python using official Installer on Windows

The most recommended option to install Python is using the Official Installer, especially for developers who need a complete Python development environment.

In this section, we will walk through the entire process — from downloading Python to completing the full installation setup on a Windows machine.

Step 1: Visit the Official Python Website

Follow the steps below to download the Python installer on your Windows machine:

  1. Open any web browser and go to the official Python Downloads page for Windows on Python.org.
  2. Under this page navigate to Active Python Release, then click on the link for the latest Python 3 release (e.g., Python 3.x.z).
  3. On the release page, scroll down and choose the appropriate installer for your system:
     Windows installer (64-bit) or Windows installer (32-bit).
If you are done with downloading, now we will move to installation process step by step. So let’s get started. 

Step 2: Run the Python Installer

Once you have selected and downloaded the Python Installer, it’s time to install it. To Run it double click on the Python Installer.

There are four key things to observe in this installation dialog box:

  1. By default, Python will be installed in the AppData directory of the current user account.

  2. Clicking the “Customize installation” button lets you adjust the installation path and select additional components like pip and IDLE.

  3. The option to “Use admin privileges when installing py.exe” allows the Python launcher (py.exe) to be available for all users on the system.

  4. The checkbox to “Add python.exe to PATH” is unchecked by default. It’s important to understand that enabling this changes your system’s environment variables, so only check it if you know the impact or want to run Python from any command prompt window.

Overall, the official Python installer gives you detailed control over how Python is set up on your Windows system.

How to Install Python from the Microsoft Store on Windows

If you’re just starting out with Python and your main goal is to learn the basics rather than build professional software, then installing Python from the Microsoft Store is a great choice.

This method provides the quickest and simplest way to get started with minimal setup or configuration.

However, it’s important to note that the Microsoft Store version of Python does come with a few limitations.

According to the official Python documentation, the Microsoft Store package may not support certain advanced use cases or custom configurations that developers might need.

Step 1: Run the Python Installer

Open the Microsoft Store app in your machine on Windows and type “python” in the search bar. The may see multiple version that you can choose to download and install. Select the available latest version in the Microsoft store app to open the installation page.

Once you are on the installation page you are ready to install the Python, which we will see in the next step. 

Step 2: Run the Python Installer

Once you’ve selected the version, you want to install, follow these steps to complete the installation:

  1. Click the Get button.
  2. Wait for the app to download and install.

After the installation finishes, open Windows PowerShell and run the following command to verify that Python has been successfully installed on your system:

python --version

This command will display the installed Python version if everything is set up correctly.

Check Python Version : MacOS

Before installing Python on your macOS system, it’s a good practice to verify if it’s already installed. To check this we have steps to follow.

To determine if Python is installed on your macOS system:

  1. Open Terminal:

    • Press Cmd + Space to open Spotlight Search.

    • Type Terminal and press Enter.

  2. In the Terminal Window Type:

    • python3 –version.

    • If Python is installed, the version number will be displayed.

    • If Python is not installed, you’ll receive an error message indicating that the command was not found.

How to Install Python Using the Official Installer on macOS

Step 1: Download the Python Installer

  1. Visit the Official Python Website:

  2. Select the Latest Python Release:

    • Under the “Active Python Releases” section, click on the link for the latest Python 3 release (e.g., Python 3.x.z).

  3. Choose the Appropriate Installer:

    • On the release page, scroll down to the “Files” section.

    • Select the macOS 64-bit universal2 installer (.pkg file) to initiate the download.

Step 2: Run the Python Installer on macOS

As you have successfully downloaded the latest version of Python Installer in your MacOS. Now to install it double click on the Python installer file.

Run the Installer:

  • Locate the downloaded .pkg file in your Downloads folder.

  • Double-click the file to launch the installer.

You should see a window like this. 

  1. Follow Installation Prompts:

    • The installer will guide you through the installation process. It’s generally recommended to proceed with the default settings.

  2. Verify the Installation:

    • After installation, open Terminal.

    • Type the following command and press Enter:

    • python3 –version

    • This command should display the installed Python version, confirming a successful installation.

How to Check or Get Python : Linux

In this section you will learn about how to check whether python is installed or not in your Linux Machine. If it’s already downloaded then we will be good to go. If it’s not downloaded we will see a step by step guide to download and install Python in you Linux Machine.

Check Python Version : Linux

  1. Open Terminal:

    • Access the Terminal application from your system’s application menu or by pressing Ctrl + Alt + T.

  2. Check Python Version:

    • Type the following command and press Enter: python3 --version

  3. Interpret the Output:

    • If Python is installed, the version number will be displayed.

    • If Python is not installed, you’ll receive a message indicating that the command was not found.

Python Installation Options on Linux

If you are Linux user, you have several methods to install Python, often utilizing the Terminal and package managers. In this section we will see some common approaches to download and install Python in your Linux Machine:

1. Using APT (Debian-based Distributions)

In Linux Machine this approach to download and install Python is most recommended. For Debian-based distributions like Ubuntu, you can use the Advanced Package Tool (APT) to install Python. We will see step by step guide to download and install the Python using this approach. 

2. Using DNF/YUM (RPM-based Distributions)

For RPM-based distributions such as Fedora, CentOS, or Red Hat, you can use DNF or YUM to install Python.

3. Building from Source

If you require the latest version of Python that’s not available through your distribution’s package manager, you can compile Python from source. It is also recommended if you want the latest version of Python. 

How to Install Python on Linux Using APT (For Debian-based Systems)

Step 1: Update Package Lists

It’s good practice to update your package lists to ensure you’re installing the latest versions available:

sudo apt update

Step 2: Install Python

Install Python by running:

sudo apt install python3

Step 3: Verify the Installation

After installation, confirm that Python is installed correctly:

python3 --version

This command should display the installed Python version.

How to Use Python on iOS

Running Python on mobile is not very common, however you can run python program in your iOS devices. Though direct installation of Python is not supported in iOS. However, you can use third-party applications to run Python scripts.

Recommended Application: Pythonista 3

Pythonista 3 is a comprehensive Python development environment for iOS.

Step-by-Step Guide:

  1. Open the App Store:
    • Tap the App Store icon on your iOS device.

  2. Search for Pythonista 3:

    • Tap on the search bar and type Pythonista 3.

    • Locate the app in the search results.

  3. Purchase and Install the App:

    • Tap the price button to purchase the app.

    • After purchasing, the installation will begin automatically.

  4. Launch Pythonista 3:

    • Once installed, tap the Pythonista 3 icon on your home screen to open the app.

    • You can now write and execute Python code directly on your iOS device.

How to Use Python on Android

Running Python on mobile is not very common, however you can run python program in your Android devices. Though direct installation of Python is not supported in Android. However, you can use third-party applications to run Python scripts.

Recommended Application: Pydroid 3

Pydroid 3 offers a comprehensive Python development environment on Android.

Step-by-Step Guide:

  1. Open Google Play Store:
      • Tap the Google Play Store icon on your Android device.

    1. Search for Pydroid 3:

      • Tap on the search bar and type Pydroid 3.

      • Locate the app in the search results.

    2. Install the App:

      • Tap the Install button.

      • The app will download and install automatically.

    3. Launch Pydroid 3:

      • Once installed, tap the Pydroid 3 icon to open the app.

      • You can now write and execute Python code on your Android device.

How to Use Python Online

If you are not willing to download any application and don’t want to install anything in your machine, you can run Python scripts without downloading it. Sometimes, you may want to run Python without installing anything on your computer or phone. For that, online compilers are a great option. 

In this section we will go through some popular online compiler that you can use to run your scripts with downloading and installing any application. 

  • A free tool by Google, ideal for data science and machine learning.

  • You can write, run, and share Python code in a Jupyter notebook environment.

  • Also supports importing data from Google Drive and installing packages like tensorflow, pandas, etc.

  • A beginner-friendly online IDE that supports Python and many other languages.

  • Features include real-time collaboration, package management, and version control.

  • Simple and clean interface.

  • Good for quick testing and beginner practice.

  • No signup required.

Conclusion

If you have gone through this post, you know how to download Python in your machine. So if you liked the post please do share it your friend and family who want to learn python. 

Frequently Asked Questions

Coming…

Exit mobile version