Lab Manual Day 1 Python Installation
Lab Manual Day 1 Python Installation
DAY :1
Session : 1
Objective of Lab:
To download the Software Development Environment available setup the development
environment.
Software Resources:
1. Python
2. Anaconda
3. Jupyter notebook
4. Visual Studio Code
-----------------------------------------------------------------------------------------------------------------
1. Python:
Python is a versatile, high-level programming language known for its simplicity and
readability. Python's rich ecosystem of libraries like NumPy, Pandas, and TensorFlow
empowers developers to tackle diverse tasks efficiently. Regardless of your operating system,
you can download an appropriate version of Python from the official site.
To check if you have python installed on a Windows PC, search in the start bar for Python or
run the following on the Command Line (cmd.exe):
python --version
If you find Python is not installed, install it using the following instructions.
Installing or updating Python on your computer is the first step to programming in Python.
There are multiple installation methods, such as installing Python using an installer or a
source code (.zip file)
Let’s open the command line or terminal and type the below command to check the version
of Python.
python --version
2. Anaconda:
Anaconda is an open-source software that contains Jupyter, spyder, etc that are used for
large data processing, data analytics, heavy scientific computing. Anaconda works for R and
python programming language.
Getting Started:
Select Installation Type: Select Just Me if you want the software to be used by a single User
3. Jupyter Notebook:
It is an interactive web UI environment to create notebook documents for python, R
languages. Jupyter Notebook documents take statements similar to REPL additionally it
also provides code completion, plots, and rich media.
Install and Run Jupyter Notebook
Once you create the anaconda environment, go back to the Home page on Anaconda
Navigator and install Jupyter Notebook from an application on the right panel.
Now select New -> PythonX and enter the below lines and select Run. On Jupyter, each
cell is a statement, so you can run each cell independently when there are no
dependencies on previous cells.
After the download finishes, click on the vs code installer and it will start the setup
Step 3: It will ask you to accept their agreement, you can read it if you want and make sure
you agree and click on next.
Step 5: Then it will show ready to install, so click on the install button and It will take around
a minute to install vs code on your machine.
Along with python extension it will install some other additional extensions so it will take
some time also make sure you are connected to the internet.
2. Configure Python Interpreter
Now to we will need to define the python interpreter in vs code to do that: Open command
palette by using the shortcut ctrl+shift+p or in the menu go to view> command palette.
In the command palette search for Python: Select Interpreter, it will show select python
interpreter option click on it and now you need to choose the python interpreter it will
display the installed python interpreter on your machine select it.
To create a python file inside that folder, move your cursor beside your folder name, it will
display a button to create a new file click on it and name the test.py. Make sure the name
ends with .py as it defines a python file.
In the python file write print(“Hello World”) and click on the button in the top right side.
it will open a terminal with output Hello World.
Note: I wrote test.py because my python file name is test.py so you need to write the name
of the python file you want to run.