Running Jupyter notebook in VS Code, set up, getting started with python in VS Code

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
jupiter notebook is one of the best way to learn python because you can step by step see what all commands are getting executed how they're getting music executed so if there exists a way where we can run jupyter notebooks in visual studio code that would be awesome because visual studio code isn't very great id it is compatible with almost all the languages so in this video i'll be showing you exactly how to do that so before getting started welcome to my channel technosaver so i have created a folder called python let's open this folder in visual studio code and create a new file as soon as i create a new file i'll go ahead and quickly save it but this time i'll be giving it an extension name i'll be saving it in the name of demo.ipynb ipynb is the extension for jupyter notebook and i will be clicking on save so after creating this new file i'll be just opening the file and as soon as i open it visual studio identifies that it is a type of jupyter notebook and it gives us the interface so that we can write some code so in this code i will be writing a program we can swap two variables for example planet one is earth planet two is mars and we'll be just swapping both of them like planet two comma planet one equal to planet one comma planet two and i'll be printing this planet one and planet two as soon as i try to click on enter it's telling me that we need to install kernels from the marketplace again we just need to click on it it will automatically start installing the required kernels first we'll be installing the jupyter notebook and as you can see the associated jupiter key map also will get installed automatically let's wait for some time until all this plugin gets installed so after everything is getting installed we'll go back to our demo file and we'll click on run again now it is asking us which language or which interpreter of the python we need to run it against i'll be selecting python 3. let's click on the play button again as you can see we got three pop-ups first of all it is telling that we cannot activate the python extension because it depends on the other python extension which is not yet installed on the top we have one more pop-up telling us that do you want to install the recommended extension for python so we need to select install here the first one the second one we will be just selecting the button install and reload and in the third one it is saying that the python extension is required to perform this task click yes to open the python extension installation page we'll be selecting all three of them so as you can see now my python is getting installed after the python gets installed visor studio reloads itself because we have selected the proper buttons in the previous popups now if you see the jupyter notebook files starts coming with color codes like the variables are now in blue color the variable values are in orange color if i click on play button again now visual studio shows you a pop-up that running sales with python version 3.7 requires ipy kernel package so let's go ahead and install it so after clicking on install below it is telling that it is installing the ipy kernel let it get installed it will take some time yes even if your internet is fast it will take at least a minute or two to install all the necessary packages i'll be fast forwarding this and i'll be moving on after the installation what happens meanwhile let me also go ahead and update the program so that it is bit more readable okay looks like the installation is completed and below it is telling that connected to kernel python 3.7 so it is connected on clicking of play button you see we are getting the swap planets so the new planet one is mars and the new planet two is earth so this is how we can quickly get started with python in visual studio code using jupyter notebooks now what will happen if we try to create a new file will it automatically get reflected let's try it out so again i'll be going to the get started page create a new file and here you get a new option telling that whether you want to create a file with the jupyter notebooks extension or not if you remember previously we had to manually give the jupyter notebook extension that is ipynb so on selecting the file the jupyter notebook interface opens up let's write some quick program like print hello world and subscribe to technosaver obviously but as soon as i click on run again it is telling which of the python languages you want to use guys note that if we used something different it will be trying to install the associated python versions so it's better to be using the same python version again and again unless you want to create different virtual environments and run different versions of python in your laptop so as soon as i selected a python version now the output comes as hello world and subscribe to technosaver now your visual studio is completely up and ready to run the jupyter notebooks hopefully you like this video if you like this video please hit the like button and if you are new to our channel please do subscribe thank you
Info
Channel: Techno Saviour
Views: 46,961
Rating: undefined out of 5
Keywords: vs code, visual studio, visual studio code, jupyter notebook, jupyter notebook tutorial, jupyter notebook setup windows, jupyter notebook setup, jupyter notebook server, jupyter notebook in vscode, jupyter notebook in vsc, how to use jupyter notebook in vscode, india, saviour, techno, techno saviour, technosaviour, techsaviour
Id: 9V7AoX0TvSM
Channel Id: undefined
Length: 5min 29sec (329 seconds)
Published: Sat Jan 29 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.