0% found this document useful (0 votes)
40 views11 pages

Lab 1 - Installing Python and Setting Up The Environment

This lab manual provides a step-by-step guide to installing Python and setting up the environment for executing Python code. It includes instructions for downloading the Python installer, installing Visual Studio Code, and running a simple Python program. The document emphasizes the importance of verifying the installation and ensuring all necessary libraries and tools are available.

Uploaded by

rohankale179
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views11 pages

Lab 1 - Installing Python and Setting Up The Environment

This lab manual provides a step-by-step guide to installing Python and setting up the environment for executing Python code. It includes instructions for downloading the Python installer, installing Visual Studio Code, and running a simple Python program. The document emphasizes the importance of verifying the installation and ensuring all necessary libraries and tools are available.

Uploaded by

rohankale179
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

LAB MANUAL

Installing Python and setting up the environment

Disclaimer: The content is curated from online/offline resources and used for educational purpose only
Disclaimer: The content is curated from online/offline resources and used for educational purpose only
Installing Python and setting up the environment
Objective:

To execute Python code, you need to have a Python interpreter installed on your system.

- Install a supported version of Python compatible with Local Machine .


- Install an editor.
- Install the Cloud Client Libraries for Python
- Check which version of Python, if any, is installed on your machine
- Use Python on the Web with online interpreters
Equipment Required:

1. Install VS Code - https://code.visualstudio.com/download


2. Download Python Installer File - https://www.python.org/downloads/
Prerequisites:

1. Basic Computer Skills - Anyone starting to learn computer programming needs basic
computer skills. Python is a cross-platform language, so it makes no difference whether
you use a macOS, Windows, or even Linux.
Problem Statement:

To successfully install Python and set up the necessary environment to perform python simple
program and, ensuring that all required libraries and tools are available and functioning
correctly.

Procedure:

Setting up the Environment:

1. Download Python Installer File


2. Run the Installer
3. Install Python
4. Verify your installation
5. Install VS Code Editor
6. Run your python first program
1. Download Python Installer File:

Go to the official Python website (https://www.python.org/downloads/) and download the


latest version:

Disclaimer: The content is curated from online/offline resources and used for educational purpose only
The Python.org website automatically detects your operating system and gives you the right
installer.

Downloaded.

2. Run the Installer

Now, go to your download folder and run the installer you just downloaded.

Disclaimer: The content is curated from online/offline resources and used for educational purpose only
Click that file to install.

3. Install Python

Once you have run the installer,

On the screen, you will see two options: Install Now and Customize Installation. We suggest you
skip all customization steps and simply click Install Now.

- Check on Add python.exe to PATH as it ensures Python is added to our system's PATH
variable.(Recommended)
- Click Install Now, as it will include all the necessary files needed later.
Note: This makes it easier to run a Python Program from the command prompt (cmd) directly
without specifying the full path of the Python executable.

Disclaimer: The content is curated from online/offline resources and used for educational purpose only
After using this option, Python will be successfully installed in your device.

4. Verify your installation

After the installation is complete, you can verify whether Python is installed by using the
following command in the command prompt.

python --version

Disclaimer: The content is curated from online/offline resources and used for educational purpose only
Now, you are all set to run Python programs on your device.

5. Install VS Code Editor

Go to the VS Code Official website and download the Windows installer. Once the download is
complete, run the installer and follow the installation process.

1. Download

Disclaimer: The content is curated from online/offline resources and used for educational purpose only
2. Install

Disclaimer: The content is curated from online/offline resources and used for educational purpose only
Disclaimer: The content is curated from online/offline resources and used for educational purpose only
Click Finish to complete the installation process

6. Run your python first program

First open VS Code, click on the File in the top menu and then select New File.

Disclaimer: The content is curated from online/offline resources and used for educational purpose only
Then, save this file with a .py extension by clicking on File again, then Save As, and type your
filename ending in .py. (Here, we are saving it as Hello_World.py)

Note: Before you start coding, make sure the Python extension is installed in VS Code. Open
VS Code and click on Extensions on the left sidebar. Then, search for the Python extension by
Microsoft and click on install.

Disclaimer: The content is curated from online/offline resources and used for educational purpose only
Now, write the following code into your file:

print("Hello World")

Then click on the run button on the top right side of your screen.

Output:

You should see Hello World printed to the command prompt.

Disclaimer: The content is curated from online/offline resources and used for educational purpose only

You might also like