Home / Computer Science / Python / Python Installation and Environment Setup

Python Installation and Environment Setup

Python Installation Checking:

As python is most widely used language so before installing python in PC you must check if the PC has already python or not.

To check python installation, type the below command in command prompt in windows.

Vesrion of Python
          Python Version checking

C:\Users>python --version
Python 3.7.4

If you want to check in Linux or Mac.

Python – version

Python Execution:

Python is interpreted programming language, as a developer write code in note pad and save file with extension of .py (dot py), and then put those file into the python interpreter and execute like below.

C:\Users>python firstpython.py

Here firtspython.py is the file name.

The file fisrtpython.py contains below code.

print ("Welcome to python programming")

C:\Users\gadagammasantosh\Music>python FirstPython.py
Hi! welcome to python programming

Python Output
                                              Python Output


If you type exit() then the terminal will be closed.

If the python not installed in your PC get the windows installer from the source
Download here

Python Environment Setup:

Python installation on Windows: Python is available freely on the www.python.org/downloads Download here and choose suitable downloaded version for your system.
For windows there is an windows installer (.exe file) choose that click on download.


Python downloads
                                                                                       Python downloads Page

By double click run the downloaded file and you will get the below screen.
Then check the “Add Python 3.7 to Path” it is mandatory otherwise we need to configure it manually.

Add Python Path
                                                                    Add Python to system Path

If you select Customized option, then the screen looks like below select what you want and click on Next

Python Optional Features
                                                              Python Optional Features while installation


Select the features what you want to install and click on Install.


Python - Advanced Options
                                                                        Python – Advanced Options


The python setup will installed and it shows in progress.


Python -Setup Progress Bar
                                                                        Python -Setup Progress Bar


To check whether it is installed on your system, go to command prompt and type “Python” like below.

Installation in Linux:

Follow the below commands in your environment.
First confirm python is available in your Linux machine by using the below command

$python –version

If python is available, it shows version details otherwise it says not found then follow below steps to install

$sudo apt-get install python3.7

Then the python is download into your machine.

Like the same way installation can be done in Mac and iOS machines.

About GSK

Hi, i am Santosh Gadagamma, a tutor in Software Engineering and an enthusiast for sharing knowledge in Computer Science and other domains. I developed this site to share knowledge to all the aspirants of technologies like, Java, C/C++, DBMS/RDBMS, Bootstrap, Big Data, Javascript, Android, Spring, Hibernate, Struts and all levels of software project design, development, deployment, and maintenance. As a programmer I believe that, "The world now needs computers to function." Hope, this site guides you as a learning tool towards greater heights. I believe that Education has no end points and i wish to learn more in the process of teaching you.

Check Also

Basic Syntax in Python

Identifiers in Python: An identifier is a user-defined word for a special purpose. An identifier …