PyTorch Installation: How to install Python, Cuda Toolkit, and PyTorch on Windows 11

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi welcome in this video we will see how to download and install pytorch on windows 11. so for this just search for pytorch and here you can see the official link to pytorch which is a pytorch.org just click on that here you can see the web page to pytorch and just scroll down a bit and you can see uh here are different options to choose in order to install pytorch the first one is pi torch build which is the stable one 1.13.1 and then after that you have to choose creating system so I'm installing on windows so just click on Windows or if you want to install this on Linux so just click on Linux so I'm going with Windows and then package going to install pytorch with Konda or pip or lib torch so select accordingly I'm just going with Pip language uh I'm going with python and then compute platform so if you have GPU then you have to select Cuda and if your machine doesn't have a GPU then you simply go with CPU so I have GPU so I am just going to choose the latest version of Coda which is supported by pytorch so here you can see uh 11.7 and Kodi 11.6 there are latest release of Cuda which is 11.12 I think so we are not going with that because that is not spotted by pie torch so we can use Coda 11.7 so after selecting the options uh here you have the command that you need to run your command prompt but before that you have to install the dependencies so we have two dependencies the first we have to install Python and then we have to install Coda toolkit so let's first install python just type python.org here is the official website to python just click on downloads so here you can see the latest release of python is at 3.11.2 but we are not going to download this because this might have some dependencies issues with Pythons however I have tried with uh by torch with python 3.10 7 so I'm going to install 3.10.7 so for this you have to check the specific release of python so here you can see we have 3.10.7 so just click on that and then scroll down to download The Interpreter according to your CPU architecture so I have 64-bit architecture so just click on Windows installer 64-bit and it starts downloading so once download is completed just go to downloads folder and here we have python 3.10.7 so just double click on install before installing make sure to check the add python 3.10 to power so this will automatically uh set the python interpreter directory to the system variable path and then click on install now so python setup was successfully installed so just click on close and open CMD prompt and here you can check whether python is installed or not so for that just type Python and here you can see python 3.10.7 is installed successfully you can type a simple query just to check whether it is working correctly or not and you can see so just exit from python uh pip version so for that type the command pip space hyphen hyphen version and you can see pip 23.0 version is installed on your machine so as you can see here we have two different dependencies for pi torch to install the first one is pip and the second one is Coda so we have successfully installed pip so now we are going to install coda so put our toolkit so before uh going to install coda let me show you one more thing we must have latest version of pip in order to upgrade the PIP version you have to type the command if install hyphen hyphen upgrade okay this will update the PIP version it's going to install a 23.0.1 so as you can see it is installing the latest release of the uh or latest version of the web this is giving an error so let me check the version again okay so it's uh Again by tip 23.0 so just we have to run this command in order to upgrade so just copy and paste it here as it is already downloaded so it's just installed the pip 23.0.1 version so let me check paper version again so now you can see we have picked 23.0.1 that's all we installed Python and upgrade the PIP version so after that we have to install the second dependency which is coda so for this just type Coda toolkit and here you can see the official website of Nvidia but we have to open the link with Coda toolkit archive because we are not going to install the latest release of Coda toolkit which is you can see 12.0 but we have to install we need to install 11.7 so that's why we are going to archived a webpage of the Nvidia here you can see uh the latest release is 12.0.1 but we have to install Coda 11.7 as it is supported by the pytorch you can see here so just click on 11.7.0 select your operating system and architecture and then version select exe or local and now you can see the download option just click on that this is a heavy file of 2.5 GB it will takes time to download Once download is completed and just go to downloads folder and now you can see we have coda 1127.0 just double click on that click ok now it is extracting the coder toolkit now it is checking system compatibility uh this is asking that you are installing an older version yes we know we have we are going to install 11.7 which is the older version so just continue and agree and continue listens agreement and then custom or Express we are going with Express or recommended one next and just check this option and next it's preparing for installation this is the installation summary and just click on next Nvidia installer has finished and just click on close now in order to check whether it is installed or not and which version of the coda toolkit is installed so just open command prompt and type nvcc hyphen hyphen version so you can see Nvidia Coda 11.7 is installed and with nvcc stands for NVIDIA Cuda compiler so just close this one and let's move back to the pie torch website now you can see we have installed python we have the package installed and we have the code it 11.7 so now just copy this command and open command prompt and paste the command you can use this pip 3 or you can simply use if both works but I'm just deleting these three and just using the PIP install torch torch vision and torch studio and just click enter now in order to verify whether torch is installed successfully or not just opens command prompt and write python now we are in Python interpreter and let's import torch now in this way uh type a simple command to check whether it is working or not so let's print dots.rent between 2 and 4 means let's enter now you can see we are just printing a matrix of two rows and four columns so that means torch is working accurately and it is installed successfully now we just want to check whether we have coda in our machine or not code or GPU so for this let's write torch dot Coda dot is available it returns true that means we have GPU installed in our machine so suppose we want to check how many Koda devices we have in our machine for that we have to type torch.codone dot device count so now as in my machine we have only one GP installed so that's why it returns one so if you want to check the name of the device name of decoder device you can type dots dot Coda Dot get device name so you can see Nvidia GeForce and 940mx I haven't uh this GPU installed in my machine now do some rice we have done uh Pi torch installation in this video and in order to install bytorch we have to install python interpreter and Coda toolkit so we have first we have done python installation and after that we have downloaded and installed Coda toolkit and after that we have installed by torch on Windows 11 so that's it
Info
Channel: Data Expert DE(x)
Views: 27,066
Rating: undefined out of 5
Keywords: Data Mining, Data Science, AI, Artificial Intelligence, Deep Learning, Computer Vision, Python, Machine Leaning, Shahzad Ali, Shahzad, Database Systems, pytorch, cuda, cudatoolkit, python, interpreter, installations, windows 11, cuda Toolkit, Nvidia Toolkit, Nvidia, pytorch installation
Id: Kp6c5v9iL84
Channel Id: undefined
Length: 10min 29sec (629 seconds)
Published: Mon Feb 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.