HomeOur TeamContact

How to install Python in windows 10 OS

By Nicodemus Ngufuli
Published in Python
January 26, 2021
2 min read

We will learn how to write python code and running it using Python.It is mandatory to install Python in our computer in order to excecute python programs in our machine, however you can use any online python compiler in platforms such as onlinegdb. We will first learn how to install Python Software in windows operating system then proceed further with python code excecution.

Installng Python for windows operating system.

The latest version of Python in the end of year 2020 is Python 3.9.1. In is version has to varieties, a 32-bit and 64-bit. Depending of your operating system you can download by visiting the link: here Beneath the this link’s page, click “windows x86-64 executable installer”. The file name “python-3.9.1-amd64.exe” will be downloaded in your computer. Afterwards you can easily install Python by double clicking and following the instructions.

Perfrom the following steps to install Python.

  1. Double click the “python-3.9.1-amd64.exe” file. A dialog box appears.
  2. Select install for all users as well as Add Python 3.9 to path checkboxes.
  3. Click Install Now as shown below. Install Now
  4. The installation progress bar will appear as shown below. Setup Installation Progress

When the Python setup installation is done, we can see a Setup was successful message as shown below. Setup was Successful 5. Click the close button.

Testing Python Installation in Window 10.

  1. Click the start button on the task bar of the Windows 10 OS. Since all applications are displayed in alphabetical order, scroll down to P and view Python 3.9 folder, inside this folder you’ll see icons named:
  • IDLE (Python 3.9 64-bit)
  • Python 3.9 anuals (64-bit)
  • Python 3.9 Module Docs (64-bit)
    P folder
    P folder
    Python icons
    Python icons
  1. Click the IDLE (Python 3.8 64-bit) option. The Python’s Integrated Development environment(IDLE) GUI shall open. Integrated Development Environment

  2. Click inside the IDLE’s prompt ie.,>>> and type quit() to close the Python window. A prompt asking ‘Do you want to kill it?’ shall appear.

  3. Click OK button to exit the IDLE window. Exit IDLE

  4. Click the start button on task bar then click Python 3.9 (64 - Bit) to open Python command line displayed on a black screen. Python Command line The Python command line has same use case as Python IDLE by typing code and running it. To quit from Python command line type quit(), similarly as how we exit in IDLE.

How to verify the path to Python.

When installing Python in our Windows Operating System, the path is automatically set to Python. We can verify the path to Python’s directory in Windows Operating System environment variables

Follow the steps below to view the path to Python directory.

  1. Right click this PC icon, then click the Properties option as shown below.

    Properties of Computer
    Properties of Computer
    It will display a page where we should click Advanced system settings option.

  2. Click Environment properties button. Environment variables

  3. Select path variable followed by Edit Editing the path in Environment variable

  4. Click Edit text located at the right side of the Environment variable dialog window. Python directory in Path variable

This will display all directory within the path.The directory can be observed by name Python\Python38-32\Scripts is added to the path. Python directory in Path variable 5. Add a dot at the end of the directory and click OK. (.) Dot represents where Python gets executed. Therefore the dot will enable Python to run on any directory.

Different ways of executing a Python Program.

There are mainly three ways of exucting Python programs.

  1. Python command line.
  2. Python IDLE.
  3. Using system prompt.

Python command line and Python IDLE are generally termed as interactive modes because the PVM executes the code immediately after a programmer types one line at a time. System prompt is also referred as non-interactive mode since the PVM has to execute the whole code after being written by a programmer.

Using Python’s command line.

click on your windows start button then search for Python


Tags

#pythononwindowsinstallingpython
Nicodemus Ngufuli

Nicodemus Ngufuli

Software Engineer and content editor at UltimaxDev

I am a Full-Stack Software engineer, currently learning advaced java as a hobby

Expertise

NodeJS
ExpressJS
React
Laravel

Social Media

instagramtwitterwebsite

Related Posts

Python data types
Python
Data types in Python.
February 03, 2021
4 min
© 2023, All Rights Reserved.

Quick Links

Advertise with usAbout UsContact Us

Social Media