Anaconda and Visual Studio Code Setup

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone today I will show you how to install anaconda and visual studio code I will show you my favorite extensions and how I run python code using a anaconda virtual environment and the command line so let's get to it we will now install Anaconda so just go to Anaconda .com download this here of course I'm Gonna Keep It right this is ready to be installed all right yep that's okay okay yeah that's okay I also want to have python 3.10 okay all right this is completed I don't need that I think cool so of course there is the Anaconda Navigator um but I don't think I will use that actually haven't used it in a while more importantly it's actually the anaconda or conda prompt but let's just double check both so yep that's the Navigator all right yes I want to quit I'm more interested in the Anaconda prompt which I'm in here I can see already this is the virtual environment this is base and I think I should be able to do something here okay so this seems to be working I'm pretty sure I can now install bunch of things that just double check content list you can check that we have the base yes that looks good it's used up that's cool I think I can also say something like this n actually the other way around then we should should give me the whatever is installed in base okay cool all right next up we will install Visual Studio code as our IDE so we're going here and we are downloading for Windows in my case and we'll keep that installing I'm accepting this this is where I want to install this stuff yep I just want to keep it like that and we can launder it that's very much that I will now set up some basics in Visual Studio code generally here over here there are the extensions so I guess I have a couple of favorites um generally maybe we can start with that even but I mean that's just really personal preference what I like is um actually I like the Dracula um but I recently found a very cool new one which is called IU are you Mirage to be exact this one I'll just install that okay very very important so what I think is very important indeed is the graph I'll install that as well as so you can visualize a bit better if you're working with GitHub and Zone what else do I usually have is live share I will be installing so you can collaborate on your code and what I also really like is the material I can I can see so you have really nice little icons next to your file names all right then I also think prettier is something very nice to help with purifying let's say your code installing that I also like rainbow like it's I started this version um sort of got an update so maybe this is Rainbow brackets 2.0 I guess I'll install that so you know exactly like where you are in terms of your brackets or your packets will help you to with color to navigate in nested kind of loops and so on then I guess last but not quite least is this to do tool um with the tree so you can add to do tags in your code and they show up in a list which they are sorted in okay and next would be get lens here we are installing that all right very nice so I want to show you two more things and that is under preferences settings first of all that would be formatter and so basically format on Save that is very handy I think each time you're saving your script it's formatted there's no default formatter currently so I suggest to specifically change that for python and c-sharp for example so we can set it for python for melting and here it is set to set to Black um yeah that's correct provider I think it's called python formatting this should be black so for example right okay and the other thing is um a setting where you can change what you are actually seeing on the bottom of your file you can change what is written here so if you have multiple folders open for example um it's basically super unreadable so what I really like to do is um I would basically use the folder name as well as you can write here like that um oops wow Theory remote name like so all right cool so I can save that and close it great all right so let's add a couple of python specific extensions so under left to click extensions and of course we need python installing that while this is installing next up would be black formatter for python actually I don't know if I can click install and it will just queue it up I hope so um I definitely want to have Jupiter all right so last thing I want to show you is how I'm now running a bit of code here so we'll just create a new python file you're just gonna call it I'm just gonna save it on the desktop actually this Dot py and in here of course we need some code very creative hello world great so um there are a couple of ways how to actually run this program here now um so first of all we probably need a interpreter and that in that case we can pick down here so if you click here you should see for example python 3.10.9 um base right that is basically coming this is the base environment of our Anaconda so if you select that we should pretty much right off the bed be able to execute this um all right so it executed the program here's our output perfectly fine so but what you can see here is that it is not recognizing conda here it tries to actually activate our base environment but it it cannot do it so what I have to do here is I will go over here and say select default profile and I will add the command prompt uh like this and so let me close this and so when I click play it should activate the base environment even though it's activated but then it will run the program okay so this is the first way and the second way is of course typing python test Dot py which does the same it executes this program here right I could add parameters to my command and so on so forth but and so the third one I guess the most important one I feel like is with creating a launch Json and the python file here python current file that is exactly my file so it's essentially executing or it's debugging the file I have opened like that but I can also specify specifically which file that might be so if I copy that path here and I'll edit here um probably have to change this just like that saving that launch file and then I'm just gonna say my custom debug whatever go to debug select my custom debug and press play right and also here it executes that um program but of course now I can actually um at break points right and then I'm saving this running this again and it will the program will stop here and I can with the debug console I can actually check what's going on um while this is running right all right so that's pretty much that um I hope this was helpful um and have fun programming and see you next time
Info
Channel: Philipp Dominic Siedler
Views: 21,493
Rating: undefined out of 5
Keywords:
Id: ljFwYKL6-1U
Channel Id: undefined
Length: 12min 30sec (750 seconds)
Published: Wed Jul 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.