PyTorch Tutorial 0: Installing PyTorch using Anaconda for PyCharm and VSCode

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to my first pie tour tutorial today I will be showing you guys how to install pie torch and how to set it up in pycharm and vs code without further Ado you just personally go to anaconda.com you can search up and Google should be the first link then you click this download button once it's downloaded you run the installer which is that it's just pretty simple I would say I would recommend going all users require if you have admin privileges makes it yeah okay then next wait for this to finish up oh so it seems like it's done just click next next so once you have Anaconda installed you're going to want to go to pytorch.org I'm gonna scroll down select stable and then select your OS of that I like to select pip and not condor the lab torch would just be for the C plus Source not really sure what that is but I just like to select perp going to be python obviously then Cuda 11.6 for me you can select 11.7 if you want if you don't have a GPU or you don't have a Cuda enabled GPU you can go with the CPU option over here but obviously I'm going to install the GPU option to check if your GPU is kudi enabled for a Nvidia Graphics logic you can go to Cuda gpus and just go to this page it is in one of these lists that means it's GPU that it's Cuda enabled so you can see it could enabled right here if I just go to this I'm using the the products are not the notebook products so I'm going to scroll down all the way to the 1080 I have a GTX 1080. you can check a GPU by going to just the control panel that is done you can go to system information this is if you have an Nvidia GPU if you don't have it then this won't work and you can see monster GTX 1080. but yeah I digress so off that you want to copy this and then we want to open Anaconda prompt of that we're going to want to make our torch environment we do that by going Condor create Dash name and then we give it a name which is we're going to name a torch we have to select the python version which we will say is 3.9 so let's just install that it's gonna yes now that it's done we can take this command over here condo activate Torch to activate our environment so contact with torch you can see you just need to make sure that this um that it says torch over here not base so you can see we can we switch the torch environment now let me just clear this with CLS on Windows it's a bit more clear then we're gonna yeah copy paste this we've already copied it but we'll copy it again just hit enter to start installing cool all right cool so once it's done installing let's just show you guys how to actually get that working in pychom so once python is loaded we just go to settings and then while it's already opened for me over here but you'd probably look something like this you can go to Project tutorials python interpreter you can also just type in Python interpreter up here and it will pop up over there of that it's going to already say torch for me but to add it you're gonna have to go edit local interpreter condo environment just wait for this detecting Condor and then it'll pop up here and then we just click ok then apply okay and then it's just gonna update all the skeletons and such so while that's doing that we're going to open up vs code so with vs code we'll we'll press Ctrl p that will bring that up at the start then we're gonna hit the close angular bracket type in Python interpreter and then this will come up I'll wait a bit for it to load okay there it's detected our torch environment so we click that we can just click run for our just create a file quick torch dot Pi then we go import that's probably a per name um this torch so torch and then we'll just go print torch dot run and then we're just gonna go oh a tensor of 2x4 save that and then we're just going to run this so if you're on a Windows system you're probably going to run into this area so what we're going to want to do is actually we're going to want to change the default interpreter then we set it set this to command prompt of that we just delete this hit Ctrl folder told this the key underneath the Escape key so after that is done we can just click play then we can see it outputs our our random tensor of 2x4 so two rows and four that's how you install Pi torch and set it up for vs code and pychon I hope you guys enjoyed if you want more content like this and if you would like to follow my tutorial series on tensorflow and Pi torch Please Subscribe there will be more videos to come thanks for watching bye
Info
Channel: Rashaad Meyer
Views: 4,415
Rating: undefined out of 5
Keywords:
Id: vOD3kSwpDFY
Channel Id: undefined
Length: 6min 38sec (398 seconds)
Published: Wed Mar 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.