How to Install Python on your Computer

Wow, glad one new member is going to add to the Python community. If you want to learn or set up how to install Python then you are in the right place.

Python is a cross-platform programming language that means programs written in Windows can be successfully run inside macOS or Linux vice-versa.

In this tutorial, we are going to discuss the installation process of Python in your computer OS.

Well, before starting if you want to know the history of Python, then check out this link History of Python and get the knowledge of how actually Python journey started.

Installing Python on Windows

Before installing Python, first, check whether Python has installed already in your system by opening a command prompt and then entering ‘python’.

If you get a Python prompt(>>>) as a response, then Python is installed on your system.

C:\Users\PySansar> python

Otherwise, the system will throw messages like “python is not a recognized command” which means Python isn’t installed.

Download Python Installer

Let’s download the Python installer for windows. Go to link and download the latest Python version 3.10.1 as of Jan 9, 2022.

Download python button

Note: If your system has Python version earlier than version 3.6 as only Python 3.6.x and later versions are supported by Python Software Foundation(PSF). Then you have to install the latest version in order to upgrade.

To see the installed Python version on your system, go to the command prompt and type as:

python --verison

After downloading the file which is in extension .exe, go to the Downloads folder and double click that file, and the dialog box will appear on your screen.

Make sure that you select the option Add Python 3.10 to PATH, which makes it easier to configure Python correctly on your system.

Then click on Install Now button and wait for a couple of minutes until the Python is completely installed.

Python Installation Steps

Yay, we did it now open the command prompt and again type python. This time you would see Python prompt(>>>) and the information stating the following Python version found in your Windows machine.

Let’s print a simple “Hello Python Sansar” string in the command prompt as:

>>> print("Hello Python Sansar")
Hello Python Sansar

You will see the output next after the print statement. To exit from the Python interpreter, press CTRL+Z or enter the command exit().

Installing Python on macOS

Python is already installed on macOS systems by default. However, if macOS contains outdated Python version 2.x.x, then you can upgrade to the latest version by following the same steps as we did for Windows previously.

Installing Python on Linux

As the Linux OS is designed for programming purposes, Python is installed by default here too.

Here in Linux, you have to mention earlier in your command that which Python version is you going to be used. For example, if you want to run Python version 3, then in terminal type python3 else type python2 for version 2.

Python version 3

pySansar@pySansar:~$ python3
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello Python Sansar")
Hello Python Sansar

Leave a Comment