Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Python and Visual Studio Code: A Quick Setup Guide

IMPORTANT! If you installed Python and VS code in previous


units, you do not need to install the Python and VS code
again.

This is a guide to install Python Programming, Microsoft Visual Studio Code and setup
Python development environment on VS Code.

This guide is divided into four sections:

a. Python Installation
b. Visual Studio Code (VS Code) Installation
c. Setup of Python Development Environment on VS Code
d. Running your first Program.

It is recommended that you read this guide carefully to avoid any issues coming up
with wrong installation.

This guide is for Windows (7+).

Python
The Python programming language is freely available and makes solving a computer
problem almost as easy as writing out your thoughts about the solution. You can
create both command-line and cross-platform GUI applications with Python. The
code can be written once and run on almost any computer without needing to
change the program.

Installation
Step 1
Check the OS version

• Windows

Right Click on “Computer Icon” and Select “Properties” Option to check the
OS type (32 or 64 bit).
Step 2
Download the File

• Select the OS and Download the Python installation file from

https://www.python.org/downloads/release/python-3810/

This class will be using 3.8.10 to implement the python program. The class can
also install the latest version of Python if they want. (3.8.10 is recommended)

Windows Installer (32 bit or 64 bit) for Windows

Then Select and Download Python Version 3.8.10.

Step 3
Installing Python

• Run the installer.

• Select “Add to Path” option

This is very important!


• Choose the destination to store the python files

Step 4
Verify the installation

• Open command prompt or terminal

• Type “python” and you will enter the python shell.


If you see this output similar to the one above then the python installation is successful.

If Windows open the Microsoft App Store, please search app execution aliases in
Windows. Turn off App installer Python.exe and python3.exe.

If your CMD did not find python command, please check step 3, you need to Add
python to Path.

Visual Studio Code


Visual Studio Code is a code editor that provides support to developers in operations
such as debugging, task running, version control, etc by providing access to various
development tools at single location in the form of IDE(s) (Integrated Development
Environments).

Installation
Step 1
Visit the following link and click on the download for Windows or download for Mac
OS button. https://code.visualstudio.com/
Your download will start automatically.

Step 2
Open the downloaded installer file and accept the license agreement.
Step 3
Select “Add to Path” option.

Click on Next > Next and then Install button.


Step 4

Click on finish and your visual studio code launches.

Setup of Python Development Environment in VS Code


Step 1
Restart VS Code APP.

Step 2
Search for Python in the “Extension” Market Place and click Install.
Step 3
Select the Interpreter.

Go To bottom right on the APP to see the option “interpreter”. Click on it and Select
the default executable path. Or else enter the path manually.

Running the Python Program


Step 1
Open the Explorer from Navigation Menu.

Open Folder and create a New Folder where you can save the program files.

Step 2
Select the Icon circled in Red and Create New File named “Hello.py”.

Step 3
Add the following line to the file.
Step 4
Run the program by clicking on the Green button.

Step 5
Output looks like this

You might also like