bytes

articles

how to install python in windows os

Data Science

How to install Python in Windows OS?

icon

Vibha Gupta

Technical Content Writer at almaBetter

people3 mins

people2317

Published on09 May, 2023

Python is becoming a popular programming language for beginners and experienced developers. Python is a highly flexible and versatile programming language with strengths in scripting, automation, data analysis, Machine Learning, and back-end development. In this blog, you will learn how to install Python in Windows OS.

2 (4).png

Prerequisites

There are certain things that you will need before installing Python.

  1. A computer/laptop with admin access
  2. Internet connection

Steps to install Python on Windows

Follow these steps to learn how to install Python on a Windows laptop or computer.

Step 1: Download Python Installer

a. Go to the official website of Python to download the installer.

b. Select a stable Python 3 release.

c. Click on the link to download the executable files: Windows installer (64-bit) or Windows installer (32-bit)

1.png

Step 2: Run the executable file

a. After downloading the installer, double-click the .exe file, such as python-3.11.11-amd64.exe, to launch the Python installation.

2.png

b. Click on the “Install launcher for all users” checkbox to allow all computer users to access the Python launcher application.

c. Choose the Add python.exe to PATH checkbox to allow users to start Python from the command line.

d. If you are new to Python and want to install it with the default features given in the popup, click Install Now and go to Step 4 - Verify the Python Installation. To install optional features, click on “Customize Installation” and continue.

e. Optional Features include standard Python tools and resources, which you can install even if you don’t intend to use them.

3.png

f. Select some or all of the following checkboxes:

i.  Documentation

ii.  Pip - to install other packages

iii. Python test suite - used for testing and learning

iv. Py launcher - it enables users to open Python via the command line. Users can also install Python windows command line.

g. Click on Next.

h. You will see the Advanced options dialog box. Select the appropriate options that you find helpful.

i. Click on Install.

4.png

Wait for some time, and the installation will be completed. The dialog box will show a “Setup was successful” message.

5.png

Step 3: Add Python to the Environment Variables (Optional)

If you have selected “add Python to Environment Variables” during installation, you could skip this step.

If you want to use Python from the command line but did not include Python in your environment variables during installation, you can do it manually.

Locate the Python installation directory or path on your system before you begin. Please note that the folder name will differ if you have installed a different version.

a. Go to Start and search “advanced system setting”.

b. Click “View advanced system setting”.

c. In the System Properties dialog, you will see the “advanced tab”, click on that and then click on Environment Variables.

d. Depending on your installation:

      i. During installation, if you selected Install for all users, choose the Path from the list of       System Variables and click on Edit.

      ii. However, if you didn’t select Install for all users during installation, then select Path from the list of User Variables and click on Edit.

      iii. Click on New and enter the Python directory path, then click OK until all the dialog boxes are closed.

Step 4: Verify Python Installation

You can check whether the Python installation was successful using the command line or the Integrated Development Environment (IDLE) tool if you installed it.

Go to the Start menu and select Command Prompt.

In the command prompt, type the following:

6.png

Let’s write a simple program.

7.png

Conclusion

You have successfully learned how to install Python on Windows and have written your first program using Python in the command prompt.

Join our Full Stack Data Science course and learn how to write simple and complex programs with our outcome-oriented classes.

Become a part of the AlmaBetter network now!

Related Programs
Full Stack Data Science with Placement Guarantee of 5+ LPA
Course
20,000 people are doing this course
Become a job-ready Data Science professional in 30 weeks. Join the largest tech community in India. Pay only after you get a job above 5 LPA.

AlmaBetter’s curriculum is the best curriculum available online. AlmaBetter’s program is engaging, comprehensive, and student-centered. If you are honestly interested in Data Science, you cannot ask for a better platform than AlmaBetter.

avatar
Kamya Malhotra
Statistical Analyst
Fast forward your career in tech with AlmaBetter
Vikash SrivastavaCo-founder & CPTO AlmaBetter
Vikas CTO
AlmaBetter
Made with heartin Bengaluru, India
  • Location
  • 4th floor, 133/2, Janardhan Towers, Residency Road, Bengaluru, Karnataka, 560025
  • Follow Us
  • facebookinstagramlinkedintwitteryoutubetelegram

© 2022 AlmaBetter