📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

How to Run Python in Visual Studio Code on Windows 10/11 [ 2025 Update ] Python in VSCode

Geeky Script8:02

Transcription

Hello everyone, I welcome you all to G Script. Today, I'm going to show you how to use Visual Studio Code for Python programming. So, I'm going to write a "Hello World" program in Python, and I'm going to show you how to use Visual Studio Code itself to write that code and to run that. So, everything I'm going to show you on this video itself. So, do watch the video till the end. If you face any issues, you can always comment me on comments, and I'm also on Instagram now, so you can also follow me over there. I'll definitely going to help you.

So now, to use Visual Studio Code for Python programming, you need to install two things. First, one is Python, and next is Visual Studio Code itself. So, just simply go to your browser and just simply type "Python download." So, we are going to download Python and we are going to install Python. So, we are going to download it for Windows. So, just simply click on this download button for Python, and you'll see that Python is rightly downloading. I have already downloaded it, so I'll cancel it.

So, once you have Python downloaded, next thing that you'll need is Visual Studio Code itself. Just simply type "Visual Studio Code download," and it's going to show you this code.visualstudio.com. Click on that link. We are going to download it for Windows. Click on this download button. Thanks for your download, and you will see Visual Studio Code is also rightly started downloading. I have already downloaded it, so I'll cancel this. I'll go to my download directory, and you can see both Python and Visual Studio Code is rightly downloaded over here.

Let's double-click on the installer for Python to install it locally on our system. Need to check these both these two options and click on "Custom installation." So, that will show you these optional features. So, all options need to be directly checked, and click on "Next." Under advanced options, you need to select this "Install Python 3.13 for all users." Click on "Install." It will ask you for administrator privileges. Click on "Yes," and you can see that our Python installation is rightly begun. It's going to take a couple of minutes.

So, by the time it gets installed, I'll request you, please do subscribe to our channel, G Script, along with G Syntax. So, here also regularly I'm posting a lot of videos. So, if you subscribe to this channel, I'm going to really motivate me to make more of this kind of videos. And also, I am posting a lot of videos on WordPress and e-commerce. So, I recommend you to watch my other videos as well on this channel. So, yeah, let's wait for a minute.

So, welcome back. You can see that our Python is rightly installed. Click on "Close." So, now that our Python is ready to install, let's verify it. So, go to search and type CMD to open your command prompt. And within command prompt, if you just simply type Python, hit enter, you'll get this type of prompt. If you are getting this type of prompt, then all that basically means is your Python is rightly installed.

So, now it's time to install our another software called Visual Studio Code. Just simply double-click on that installer. Accept the license agreement. Click on "Next." So, this is where our Visual Studio Code going to be installed. Totally fine. Click on "Next," and it's going to create a Visual Studio Code folder. Fine. Next, select all these checkboxes and click on "Next." Ready to be installed. Install.

So, our installation for Visual Studio Code is also rightly begun. Let's minimize our download directory, and you can see that our Visual Studio Code is also rightly installed. Also, the "Launch Visual Studio Code" option is rightly enabled. Click on "Finish" to launch our Visual Studio Code.

So, our Visual Studio Code is rightly opened over here. Let's close this welcome note and click on this Explorer and click on "Open Folder." And go to our desktop and create a new folder and name this folder as "Python Workspace." Just select that folder and click on "Select Folder." So, that to open our Python workspace folder right on Visual Studio Code. You can always select this "Trust the authors" and all. So, Python workspace folder is rightly opened over here.

Let's create a new file. So, just simply click on this icon and let's name this file as "hello_world.py." For Python, hit enter. So, that going to, you know, open this file. Let's install one plugin. So, go to this extensions and type Python. So, it going to show you this plugin called Python. Let's install that. It is developed by Microsoft itself. So, you can see that our Python extension for Visual Studio Code is rightly installed.

So, let's go back to our file, hello_world.py, and write a simple Python program over here. So, I'll just simply print something on our console. So, "Hello World," I'm going to write, and I'm going to go to File and save this file. And you will get a run button over here. Click on this run button, and that going to show you the output on our console. Hello World, right? So, yeah, so that's how you create your Python program.

Next thing that I'm going to show you is how to install Python packages. So, for that, you need to create one virtual environment for Python. All right. So, just simply press on your keyboard Ctrl+Shift+P. Then going to open this option. So, here you need to just simply type "Python: Create Environment." So, that will show you this option, Python: Create Environment. Just simply click on that. It going to ask you what type of environment that you'd like to create, Conda or Venv. So, I'll select the first one, and I'll select the Python interpreter that I have just now installed, 3.13.1. I'll select that, and immediately will see that it's rightly started creating our Python virtual environment. So, we can see that our environment is rightly created, and it is showing that environment over here.

So, now you can easily install any Python packages. So, just on your console, you need to type what package that you like to install. So, let's install, you know, NumPy, just as an example. So, pip install NumPy, and hit enter. So, that going to immediately start installing our Python package NumPy.

[Music]

And you can see that our NumPy is ready to install. So, in this way, you can easily install any Python packages also on Visual Studio Code, and you can start working on your Python programs. So, that's basically all about this video. Don't forget to subscribe to our channel G Syntax along with G Script. That going to really motivate me to make more of this kind of videos. And also, don't forget to watch my other videos on WordPress, e-commerce. So, that also going to really benefit you guys. Along with it going to motivate me as well to make more similar kind of videos. So, that's basically all about this video, friends. Thank you very much for watching this video, and God bless you all.