How to Setup Python on Windows machine

You might be already aware of difference between low level and high level language. Buts lets quickly see what are main difference between the both. High level language such as c , c ++ and python are portable , human friendly, that is they are easier to debug and understand while writing the programs. They need either compiler or interpreter to run the programs.

On the other hand, Low level language such as machine language or assembly level language they are difficult to understand and are written in assembly language which are converted using assembler.

In case of Linux distributions Python programming language by default , but in windows it does not come with it. In this tutorial, we will learn what is python which is widely used in artificial intelligence, by astronauts, by developers for creating the apps. Learning and setting python on windows is a need of the hour. So lets get started with it.

Table of content

  1. What is Python?
  2. Prerequisites
  3. How to install Python on windows machine?
  4. A simple python code to start your day
  5. Conclusion

What is Python?

Python is a high level , oops based , interactive and a general purpose scripting programing language. Python is very easier to understand and readable. It focuses on object over functions. Python is also a interpreted language because it converts codes in machine level code even before it runs. It works on variety of protocols such as https, ftp , smtp and many more. The latest version is 3.9.2 which was released on December 2020. Python works very well with most of the such as atom, notepad ++ , vim.

Prerequisites

  • Windows 7 + operating system with admin rights
  • Command Prompt which is already present in windows operating system

How to Install Python on windows machine?

  • Now run the executable installer which got downloaded.
  • Next step will prompt you to select whether to Disable path length limit , you ignore it or disable it.
  • Now python should be installed on your windows machine.

 Verify Python Was Installed On Windows

  • Now Navigate to command prompt and type python
  • Pip is basically python package manager which is used to fetch lots of other additional modules. Pip comes with most of pythons executable. To check if it is installed use
pip -V
  • To verify if python environmental variables was successfully added. Search for sysdm.cpl and click on edit environmental variables.

A simple python code to start your day

  • Create a simple file main.py on your desktop
mystring = " This is Author of Automateinfra and its time to start learning python"
mylist   = [letter for letter in mystring] # This is function which iterates over each alphabet in mystring
print(mylist)       # This will print the result of mylist
  • Navigate to your desktop location on command prompt and use below command to run your first program in python
python main.py
  • Great work ! python was installed successfully and we could run our first program of python quickly.

Conclusion

In this tutorial we covered basic difference between high level language and low level language. We also discussed what is python and how to install python on windows machine to get you started in organization scripting and automation work.

Hope this tutorial will helps you in understanding and setting up Python on Windows machine.

Please share with your friends.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s