How to Run Python in Visual Studio Code on Windows 10 2022 Best IDE

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys if you're looking for how you can run python program in your favorite visual studio code then you're in the right place watch this video until the end because i'm about to show you step-by-step process to configure visual studio code for running python programs correctly and i'm also gonna show you how you can run two basic python program in visual studio code on windows 10 machine so without further ado let's get started firstly we have need to download and install the latest version of python to download it copy this link i have provided this link in the video description now open up your favorite web browser i am using google chrome here and paste the copied link into the search bar and hit enter this is the official page for downloading the latest version of python for windows now click on this big yellow download button and now you can see our python installer exe file is started downloading here it's around 27 megabyte file it will take some time to download all depend on your internet connection speed our python installer setup file is downloaded successfully now click on this down arrow and select show in folder let me expand the window we need to install this file right click on this file and select run as administrator click on yes and it will start the setup wizard let me close all other windows so that we can focus on installation part here select customize installation option check all the options and click on next button now check install for all users check add python to environment variables we need to change destination folder copy the python version and click on browse button now click on this pc and scroll a little bit and then select local disk c click on make new folder button and paste the copy text then click on ok button now it should be similar like this one and now we can finally click on install button it will take some time to install now we can click on close button good job now let's check python is working or not click on windows button then type cmd and then click on command prompt here type python and press enter and if you see something like this then congratulations you have successfully installed python on your windows stand machine correctly now i'll show you how you can download and install visual studio code on windows 10 you can skip this part if you have already installed visual studio code and directly jump to python configuration part copy this link and open your browser and paste the copied link into the address bar and hit enter this is the official page for downloading visual studio code to download it click on this blue download for windows button and now you can see our vs code user setup staller exe file is started downloading here it's around 61 megabyte file at the time of recording it will take some time to download our vs code installer setup file is downloaded successfully click on this down arrow and select show in folder we need to install this file simply double click on this file and it will start the setup wizard let me close all other windows so that we can focus on installation part here accept the license agreement and click on next button just leave it as default for the destination folder just make sure you have at least 250 mb of free disk space available and click on next button no need to change anything here just click on next check create a desktop icon and again click on next and finally we can click on install button it will take some time to install and finally click on finish button and it's all done here we have successfully installed visual studio code on windows 10. now you can open the visual studio code by pressing windows button and write visual studio code and click on visual studio code app ok now let's configure visual studio code for running python program for that firstly we need to install code runner extension in visual studio code press this button and in the search bar type code runner and choose the first option now press on the small green install button to run the code you can press control plus alt plus n and to stop the code from running you can press control plus alt m now in search bar type python and select the first option make sure it is from microsoft and press on this small install button it will install python debugging and code formatting support wait for it to install and it's all done here now let's write some basic python program in visual studio code for testing now click on the new file button and click on file and then select save as choose your preferred directory i am selecting desktop here give a name to your file i am writing subscribe dot p y just don't forget to add dot p y at the end of the file for python code otherwise it won't work and then click on save let me quickly type a basic python program that print subscribe now type print double quotes subscribe now to run the program you can press ctrl plus alt plus n or you can simply click on this small play button and our message is not visible this is just because we did not save the changes before running the program to fix this all you need to do is save your program and now click on play button and it works see subscribe now is printed here let's create another program which takes input from the user for that click on file then click on new file and now click on save as i'll name this file input program dot py and then click on save okay here i'm writing the code for the program that asks the user for its first name and last name and finally prints full name of the user back to the output console so our code is running but we are not able to input our first name here so this is the problem we can solve this problem by clicking on file then select preference then select settings type run in terminal here and go down a little bit and find code runner run in terminal and check this box and cancel the settings and return back to our program and also restart visual studio code now run the program by pressing play button let me type my first name here now the last name and now you can see my full name is printed here so this is how you can run python program in visual studio code if you are interested in learning more about python language then be sure to check out our beginners python programming course at the first link in the description subscribe and turn on the notification so you don't miss more videos helping you to learn how to code and become a successful programmer and i'll see you in the next video take care
Info
Channel: Tech Decode Tutorials
Views: 837,772
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, install python on windows 10, best ide, techdecode, vs code, vscode python, python in visual studio code, python visual studio, python visual studio code, python vscode, how to run python in visual studio code, run python in visual studio code, python ide, python in vscode, visual studio
Id: AKVRkB0fot0
Channel Id: undefined
Length: 9min 22sec (562 seconds)
Published: Thu Oct 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.