Python and Visual Studio Code Installation

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign let's discuss the complete process of how to install Python and visual studio code on our computers in this presentation we will cover the following topics the first topic is need of installing the python interpreter the second topic is steps to install the python interpreter the third topic is steps to install the visual studio code and the last topic is writing your first program in Visual Studio code we will now learn why we need to install python interpreter on our computers we need to install python interpreter because python interpreter is capable of manipulating and understanding bytecode which we will get from the compilation step we have already learned in the last lecture that source code must be provided to compiler and compiler in turn generates bytecode which is the intermediate code we can run this intermediate code on any machine it can be Windows Linux or Mac but the only condition is that we need to install pvm on these machines pvm stands for python virtual machine and python interpreter is part of pvm so pvm could be thought of as a complete package which is capable of running bytecode and converting it to machine code on the Fly this is what we have learned in the last lecture python virtual machine must be installed on Windows in order to run bytecode on Windows if we want to run byte code on Linux then python virtual machine must be installed on Linux machine if we want to run bytecode on Mac machine then python virtual machine must be installed on Mac machine so python virtual machine must be installed and this means that python interpreter will automatically get installed and eventually we would be able to run our codes so now we know why we need to install python interpreter let's see the steps to install python interpreter on our computers we need to follow the following steps the first step is to visit the download section of the official website which is python.org downloads then we need to download the latest version of python from the website and finally we need to open the executable and follow the instructions as shown after following all these steps we'd be able to install python on our computers so let's first open the official website which is python.org we need to visit the download section for this we need to type in python.org downloads let's open this website for this we need to open our browser first we can either type python in the Google search bar to visit the official website or we can type the URL directly in the search bar here I'm going to type the URL python .org slash downloads now we are in python.org downloads and we are now ready to download the latest version for Windows if you are on Mac machine then you will observe download the latest version for Mac or if you're on Linux then you will observe download the latest version for Linux right now I'm in my Windows machine that's why I'm seeing this line now I need to download python 3.11.1 which is the latest version of python let's click on this the download is successful I now need to click on this executable this is python 3.1 1.1 setup window we can either click on this install now or click on customize installation but before that we need to check this check box and then we need to click on this customize installation then we need to click on next we need to click on this install python 3.11 for all users this is recommended so let's check this and then click on install the setup was successful let's click on this close button now we need to check whether python is installed successfully or not for this we need to open the command prompt and here we will type python space hyphen hyphen version to check whether python has been installed successfully or not this will give python 3.11.1 which is the latest version of python and it means that we have installed python 3.11.1 successfully on our computer this means that we have installed the python interpreter successfully now we are ready to understand the steps to install the visual studio code Visual Studio code is the IDE or the integrated development environment where we will write all our python programs this is advantageous to us because if we install Visual Studio code we will see a lot of features which we will need throughout in order to write our programs so let's install Visual Studio code and for this we need to follow the following steps the first step is we need to visit the official website code.visualstudio.com then we need to download the latest version of Visual Studio code from the website after the download we need to open the executable and follow the instructions as shown let's first visit the official website code.visualstudio.com and again we need to open our browser let's type code.visualstudio.com here this will open the visual studio code website now we need to click on this download for Windows and the download is started we then need to click on this executable we need to accept the agreement click on next next create a desktop icon next install we don't want to launch the visual studio code for now let's uncheck this and let's click on finish the visual studio code has been installed successfully up to now we have discussed the need of installing the python interpreter we have seen the steps to install the python interpreter and we have installed python interpreter after this we have seen the steps to install the visual studio code and we have installed the visual studio code as well now we are ready to write our first program in Visual Studio code so let's go ahead and write our first program in Visual Studio code for this we need to open our Visual Studio code this is the visual studio code ID and here we will create a new file and for this we need to click on this file and click on new file in this dialog box we have been asked to create a text file or python file or jupyter notebook I'll choose this text file for now and I'll click on this selected language which will help me to select the language I'll type python here this will create a new python file and the name of this file is Untitled one as I have not selected any name I'll now write a very simple program which will add two numbers first I'll declare a variable num1 and assign it to value 10 then I'll create new variable num2 and assign it value 20. these two are variables num1 and num2 num1 is label given to value 10 and num2 is another label given to value 20. then after this I want to create a new variable sum and I want to assign num1 plus num2 to it now I want to write this command print within parentheses sum this will help in printing the sum which is 30 on the screen why we'll get sum as 30 because sum is equal to num1 plus num2 num1 is 10 and num2 is 20 therefore num1 plus num2 gives 30 and sum is now pointing to 30. so this means that 30 will get printed on the screen we need to save this file now and I want to save this file with name add dot pi you can save this file on your desktop or you can save it in a different folder I have created a folder python programs already on my desktop this is desktop python programs in this python programs folder I want to store this add dot Pi file so I'll click on save button to save this file add dot Pi in this python programs folder I would recommend that you should also create python programs folder and from now we'll store all our python programs in this python programs folder which is available in the desktop so let's save this now we are ready to run this program for this we will click on this terminal and click on new terminal terminal window is now open we are in this python programs folder we need to type here python space add dot pi and press enter the output that we are getting here is 30 and that is what we have expected there is one more way to run this program and for this we need to download some extensions we can click on this extensions button and we need to type here python we first need to install python extension we need to click on this and we need to click on install button right now it is showing uninstall because I have already installed python in my visual studio code but first time you will observe install button instead of uninstall so click on install and it will automatically install python in your Visual Studio code after installing this python extension we need to install one more extension which is code Runner then we need to click on this and again we need to install code Runner after installing code Runner you will observe this button this run button you can then click on this run button to see the output the output is 30. in this way we can directly run our python programs without the need of typing the commands okay friends this is it for now thank you for watching this presentation I'll see you in the next one [Music] [Applause] [Music] thank you
Info
Channel: Neso Academy
Views: 70,786
Rating: undefined out of 5
Keywords: python, python installation, installing python, python interpreter installation, python installation on windows, windows python installation, visual studio code, visual studio code installation, installation of visual studio code, vs code installation, python for beginners, python basics, basics of python, python installation on mac, python on mac
Id: ouvOYElia1A
Channel Id: undefined
Length: 11min 49sec (709 seconds)
Published: Sun Dec 11 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.