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

Поділитися
Вставка
  • Опубліковано 11 вер 2024
  • PyTorch Installation: How to install Python, Cuda Toolkit, and PyTorch on Windows 11
    Download Links:
    Python: www.python.org...
    CUDA Toolkit 11.7: developer.nvid...
    PyTorch: pytorch.org/
    cmd command: pip install torch torchvision torchaudio --extra-index-url download.pytor...
    **Commands for Verification:**
    To check pip version:
    pip --version
    **To Upgrade pip: **
    python.exe -m pip install --upgrade pip
    **To check Cuda version:**
    nvcc --version
    **To Verify PyTorch: **
    python
    import torch
    x = torch.rand(5, 3)
    print(x)
    torch.cuda.is_available()
    torch.cuda.device_count()
    torch.cuda.current_device()
    torch.cuda.get_device-name(0)
    ----------------------------------------------------------------
    ► More videos: bit.ly/2TLfkDj
    ► Association Rule Discovery in Data Mining: bit.ly/3d48NLH
    ► Classification in Data Mining: • Classification in Data...
    ► Click here to Subscribe: bit.ly/3eovHO3
    Follow me on
    ► Facebook Page: / ashahzad
    ► Facebook: / shzy12
    ► Twitter: / shahzadali039
    #pytorch
    #PyTorchInstallation
    #CudaToolkit11.7
    #Python
    #ShahzadALi
    #ArtificialIntelligence
  • Наука та технологія

КОМЕНТАРІ • 56

  • @MegaPspo
    @MegaPspo Рік тому +27

    No other tutorial mentioned that pytorch doesn't work with CUDA 12 toolkit. Thanks for being so detailed in your tutorial and saving my time 😊

    • @shahzadaliii
      @shahzadaliii  Рік тому +3

      Thanks for feedback 😉

    • @aftereffects00
      @aftereffects00 7 місяців тому

      Yeah, now I need to uninstall CUDA 12 after watching this video I thought any of the lastest version should be fine...

  • @user-xm7sw3ey5e
    @user-xm7sw3ey5e 9 місяців тому +1

    Thank you very much - a superb video. Every step detailed from start to finish, and no flashy/wasteful screens or talk! Perfect.

  • @MrApocalipsis68
    @MrApocalipsis68 Місяць тому

    I wanted to take a moment to express my sincere gratitude for your help. Your support made a significant difference, and I truly appreciate it.

  • @RidwanurRahmanextreme
    @RidwanurRahmanextreme Рік тому +3

    Thanks man, I was trying to install it using conda in ubuntu server but couldn't verify whether cuda was installed or not. It helped me.

  • @nghiatruongtrong6287
    @nghiatruongtrong6287 10 місяців тому +1

    Thank you bro, I searched all the UA-cam chanel and have no idea about why my pytorch doesnt work. Thank you so much

  • @kraken_43
    @kraken_43 Рік тому +4

    thank you, your instructions were clear and simple

  • @EXTune257
    @EXTune257 8 місяців тому +1

    DADDY, YOU DESERVE ALL MY RESPECT THANK YOU SO MUCH, IT FINALLY WORKED

  • @tanujsinghshekhawat3227
    @tanujsinghshekhawat3227 7 місяців тому +1

    Sir, i have downloaded the torch version that is compatible with the system but, I am not able to import torch, can you suggest something

  • @user-up7kn6fo2p
    @user-up7kn6fo2p Місяць тому +1

    Hi, I followed your steps but while importing torch, I'm getting the following traceback. Can you please help me out here?
    "Traceback (most recent call last):
    File "", line 1, in
    File "C:\Users\DELL\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\__init__.py", line 148, in
    raise err
    OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\DELL\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies."

  • @zainypopo
    @zainypopo Рік тому +3

    Hello sir, thank you very much for the tutorial. I am having a problem with verifying PyTorch it says no module named PyTorch, how to fix?

  • @gauravtewari6434
    @gauravtewari6434 3 місяці тому +1

    Tqq so much helps a lot save my time ❤❤

  • @Legendbomber
    @Legendbomber 3 місяці тому +1

    Thank you very much!

  • @ihavetubes
    @ihavetubes Рік тому +4

    torch only works with Cuda 11.7 just in case anyone wanted to know

    • @shahzadaliii
      @shahzadaliii  Рік тому +2

      Yes, as mentioned in video, that first check the torch website for cuda compatibility (cuda latest version might not be supported by torch)

  • @darkomiku8902
    @darkomiku8902 Рік тому +1

    thank you! It worked

  • @hellohello-tr2ey
    @hellohello-tr2ey Рік тому +1

    which visual studio program do i need to download?
    is it python?

  • @rajmhatre5692
    @rajmhatre5692 8 місяців тому

    ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
    ERROR: No matching distribution found for torch

  • @RunnerProductions
    @RunnerProductions 6 місяців тому

    As of today, which one do we do? information is confusing. pytorth will say python 3.8 or later but that is wrong. New versions of python will not work with pytorch. so do i just use the even older from the video 3.10.7? Any one have a link to the precise information?

  • @Maqymi
    @Maqymi 4 місяці тому

    the hell is going on i get this error:
    invalid syntax
    >>> pip install --upgrade pip
    File "", line 1
    pip install --upgrade pip

  • @anammanzoor1166
    @anammanzoor1166 Рік тому

    Hi @data expert DE why m getting error after installing torch the specified module not found even if i installed it

  • @bekanntbekannt8996
    @bekanntbekannt8996 Рік тому +1

    thx you Sir, Great job here. Do you have link video also, to make gpt4 model offline to work?

  • @franklinjebaraj3182
    @franklinjebaraj3182 6 місяців тому

    bro i have only intel iris xe graphics only is this possible to run cuda in this device???

  • @bodysoda7336
    @bodysoda7336 Рік тому +1

    Sir my machine having Radeon GPU.. What can i do?? Download cuda or i simply go with cpu??

    • @shahzadaliii
      @shahzadaliii  Рік тому

      Check whether it's supported by pytorch or not. You can get this info from pytorch website

  • @TahirCanKozan
    @TahirCanKozan 7 місяців тому

    why did you dowland CUDNN ?

  • @captainzeb1083
    @captainzeb1083 Рік тому

    for some reason when i try running any of the torch commands it says "nameError: name 'torch' is not defined" im not sure why

  • @hussi95
    @hussi95 Рік тому

    Thanks mate 👍

  • @shaikhkashif9973
    @shaikhkashif9973 8 місяців тому

    Whats difference between local & network

  • @icesmoke9339
    @icesmoke9339 Рік тому +1

    thanks

  • @insaneclutchesyt948
    @insaneclutchesyt948 Рік тому +1

    when trying to download pytorch
    ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
    ERROR: No matching distribution found for torch

    • @shahzadaliii
      @shahzadaliii  Рік тому

      Are you using the same version of python (pip) and cuda?
      Please also note that, either your machine supports cuda (if your machine have gpu) or cpu.
      And then copy the respective command for pytorch installation.

  • @akiladissanayaka5692
    @akiladissanayaka5692 Рік тому +2

    thanks brd, can u add cuDNN for this

  • @nowhypls
    @nowhypls 10 місяців тому

    'pip3' is not recognized as an internal or external command,
    operable program or batch file. can some one pls help me

    • @-pudding_
      @-pudding_ 9 місяців тому

      try pip instead of pip3

  • @DEM0LIS
    @DEM0LIS 9 місяців тому +1

    TY i forgot to install it to path

  • @SarahAlyy
    @SarahAlyy 8 місяців тому +1

    How do I give this video a million likes?????

    • @shahzadaliii
      @shahzadaliii  8 місяців тому

      Thanks for your feedback, I am glad it helps you😍

  • @shreerangbagal8063
    @shreerangbagal8063 Рік тому +3

    torch, cuda is successfully install in my laptop. python that function also working , But torch.cuda.is_available() when I Type got "False". I properly follow all the steps as mentioned above.

    • @wernerheisenberg9653
      @wernerheisenberg9653 Рік тому +5

      I too faced the same issue and the reason in my case was that there already existed a torch library in my python and when I was trying to install the CUDA compatible torch library, pip was refusing to install it (since torch was already installed in my system). So, I first uninstalled that old torch library using 'pip uninstall torch'.

    • @anammanzoor1166
      @anammanzoor1166 Рік тому

      same here have u resolved this issue if yes kindly let me know how?

  • @jean-charles-AI
    @jean-charles-AI Рік тому +2

    85% of the screen is not used. please make shell bigger :)

  • @codyjobe
    @codyjobe 10 місяців тому +1

    thank you!

  • @imperfect7719
    @imperfect7719 Рік тому

    why is my machine showing torch.cuda.is_available()
    False
    ?
    even after installing it. I have installed cuda 11.8

  • @atulchoudhary4852
    @atulchoudhary4852 Рік тому +5

    Hy, When I run this 'torch.cuda.is_available()' it returns me False

    • @shahzadaliii
      @shahzadaliii  Рік тому

      That means your machine doesn’t have torch supported GPU

    • @user-ub5cx4tw9x
      @user-ub5cx4tw9x 7 місяців тому

      @@shahzadaliii so I can't use it?

    • @norah5073
      @norah5073 7 місяців тому

      so how can we solve this?@@shahzadaliii