How to run Python in Visual Studio Code on Windows 10/11 [ 2024 Update ] Python Developers

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone I welcome you all to geek script  first of all a very happy New Year to all of you   today in this video I'm going to show you how to  run Python program on our Visual Studio code so   do watch the video till the end in this video I'm  going to talk about how to install Visual Studio   code then how to install Python and then I'm going  to give you a demo code on Python and how to run   that within our Visual Studio code and also I'm  going to talk about the plugins that you will   need or extensions you can say so what are all  extensions that we'll need within Visual Studio   code so that you can you know write your Python  program within our Visual Studio code so do watch   the video till the end I can promise you that  you'll be learning a lot of new things and I have   also started this uh gig syntax channel so here  I'm going to post coding and programming related   videos so you know you need to subscribe this  channel if I get you know significant amount of   subscriber I'm going to regularly post more videos  on geeky syn tax and also I have started a glicky   k skip vlogging channel so if you're interested  you can always subscribe this channel as well   so for python to run on within Visual Studio code  first thing that you'll need is to download python   itself you to just simply type python download and  you're going to show you this download python over   here so you need to open that and you can see  that our latest version of python is currently   python version 3.2.1 to just simp simply click on  this download button and you can see that latest   version of python is rightly started downloading  so to you know just simply click on the exe in   order to install it locally on your system and  here you need to just simply click on install   anyway and uh you can see that install python  3.2.1 for all users so here you need to just   simply you know check this add python.exe to path  and then you need to click on custom installation   and here you need to select this for all users and  click on next so here also you need to select this   install python 3.12 for all users and then it is  just simply click on install and when you click on   install it will ask you for administ privileges  just simp click on yes and there you go you can   see our installation of python is rightly began  so you know let's wait for some time to get it   finished installing our python by the time it get  installed I'll just simply open a new tab and I'll   just type over here Visual Studio code download  and it will show you this download visual studio   code so you need to open That official site of  Visual Studio code so both this link Visual Studio   code and python I'm going to put right in our  description all right and here we need to click on   this download button for Windows so when you click  on that it's going to start downloading our Visual   Studio code I have already downloaded it so I'll  cancel it I'll just you can see that same file   is already been downloaded over here so I'll just  simply click on the visual studio code to install   it so let's minimize our browser so to accept this  license agreement and click on next and here also   you need to click on next again next need to check  all these check boxes click on next and install   and you can see that it is preparing to install  so our Visual Studio is you know getting installed   along with our python as well so let both the  things get finished installing on our system and   I'll be then back to this video again so welcome  back and now then clearly see that our python is   successfully installed also our Visual Studio  code is successfully installed so our desktop   shortcut for visual studio code is also created so  first thing that I'm going to do is I'm going to   just simply click on close for Python and you can  see Visual Studio is installed so launch Visual   Studio code is also enabled so just simp click  on finish so that will launch our Visual Studio   code all right so in my previous video I talk  about how to run HTML on Visual Studio code so   that's why you can see that project is opened over  here I'll just simply close this now all right now   before I write anything on our Visual Studio code  the first thing that I'll recommend you to do is   just simply go to search and just type over here  CMD so that will show you this command prompt open   the command prompt and here in just simply type  python space Das Das version and simply hit enter   and you will see the latest version of python is  showing right python 3.2.1 so I want you to verify   this once before you you know proceed with this  video If you say if you see something like python   is not recognized as an internal or an external  command then all that basically mean is your you   have some issues with installing python so you  need to follow this video all over again you   can always put a comment if you see any issues  happening all right so that is the one thing   that I wanted to clarify you need to have python  installed so you can see that is coming so once   you see that fine you can close this now so next  thing that you need to do is you need to go to   this Explorer and you need to click on this folder  icon so for that we can create a folder like let's   say python _ practice all right so we are creating  a folder called python practice folder and within   our python practice folder we are going to create  a file so click on plus of the file icon and just   simply give the file name as prog dopy all right  so py is very essential py basically means you   know a python file that you want to create so  click on outside you can see that pr. py file   is rightly you know created and it is opened over  here parallely if you see it is also giving you a   recommendation that it is you know telling that  install the recommended python extension from   Microsoft for Python language so when you click  on this show recommendation it will you know   automatically going to navigate to the extension  of python so developed by Microsoft itself so   one way is to click on the show recommendation  to come over here or else you can just simply   click on these extensions and can just simply type  python here and that will also going to show you   the same python over here right so you can just  simply click on install to install our python so   um we'll need python another thing that I'm going  to recommend you to install is code Runner so just   simply type code Runner and you'll be able to see  this extension Cod Runner do run code Runner right   so here you can see that it's suppos C C++ Java  JS basically JavaScript PHP python P all these   languages right so what it will do is it will  give you a nice you know sweet run button over   here so once you install that you going to get  that run button so only clicking of that button   itself you'll be able to run any sort of code like  C or C++ whatever language you write so it's going   to support that you can see that sweet run button  is now present right so that is coming from this   code Runner and here you can see that our python  is also installed python extension so everything   is you know good let's close all this and go back  to our F folder where we have created this pro. py   so here let's give you know write a simple program  like it going to be a very simple program okay I'm   just simply going to print hello world nothing  much so hello world and uh you can just simply   go to file and save this file so if you you know  click on this expand and click on this run python   file what it going to do is it going to to you  know start you know showing you the output hello   world on our terminal so that's basically all  about this video we can you know start writing   your python projects whatever probably you  have given from your college or your school   all assignments you can you know start completing  within our Visual Studio code itself in my next   videos I'm going to talk about how to debug Python  program so that going to be a very important video   so what I'm going to do on that video is I'm going  to show you probably a big program of python so   generally what happens is in real life like you  probably have a project which contains thousands   of lines of code all right and it is really very  difficult to debug line by line like all all those   code right is very difficult so it is important  to debug right one by one sequentially you can   debug so how to debug a a Python program so that  is what I'm going to discuss in my next video so   you know do subscribe this channel press that Bell  button and if you have any issues you can always   comment in your comment sections and don't forget  to share with your friends that will really help   me to make more such videos thank you very much  for watching this video and God bless you all
Info
Channel: Geeky Script
Views: 77,494
Rating: undefined out of 5
Keywords: visual studio code, visual studio code python, run python vscode windows 10, run python visual studio code, how to run python in visual studio code on windows 10, how to run python in vscode, best ide, vs code, vscode python, python in visual studio code, python visual studio code, python vscode, how to run python in visual studio code, run python in visual studio code, python in vscode, visual studio, visual studio code extensions, visual studio code tutorial
Id: Od3ItO2aKAY
Channel Id: undefined
Length: 9min 11sec (551 seconds)
Published: Sun Jan 07 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.