How to Install TensorFlow GPU in Windows WSL2 | Install Anaconda in WSL2 | Using WSL for TensorFlow

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 121

  • @wwthe247
    @wwthe247 10 місяців тому +51

    fuck tensorflow it's not working after trying for 10 fuckin hours

    • @MohamedMohamed-sr9dq
      @MohamedMohamed-sr9dq 8 місяців тому +3

      Bro, took me several days and still nothing

    • @AdeelZia-k2t
      @AdeelZia-k2t 6 місяців тому

      Brother US

    • @MohammedAhmed-y9r
      @MohammedAhmed-y9r 6 місяців тому

      did you find any solution , I have been trying for days

    • @shaikmaaheed5629
      @shaikmaaheed5629 5 місяців тому

      me working from 3 days bro. fuck it

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

      Programmers have the consensus that linux and mac are better than windows. But I disagree. Everything works like a charm on windows, but in WSL it's all a nightmare.

  • @BarDir-v3i
    @BarDir-v3i Місяць тому +3

    For those unable to import TensorFlow into their notebook: Run "python3 -m pip install notebook" to install Jupyter in the same environment as TensorFlow. The sudo apt version of Jupyter may not use the same Python environment. This worked for me.

  • @arthurbarbier9697
    @arthurbarbier9697 9 місяців тому +20

    Hey guys if you get an empty list after this commmand :python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
    You can try to downgrade your tensorflow version to 2.15 by running this command: pip install tensorflow==2.15 it worked for me

  • @spikips9375
    @spikips9375 6 місяців тому +1

    thank you!! you have no idea how long i've struggled with this before i found this video :)

  • @Landry_Houston
    @Landry_Houston 11 місяців тому +4

    Thanks a lot! This is the only video that correctly and efficiently explains the process.

  • @DoNotLook2424
    @DoNotLook2424 Місяць тому +1

    THANK YOU! This finally got me running TensorFlow on windows

  • @kevinivangarzarivera6556
    @kevinivangarzarivera6556 2 місяці тому

    Helped me a lot man, more than +3 hours trying to fix it by myself and you came like god from heaven to teach me how to. Thank you!!!

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

    Bro this is the best explanation of how to install tensorflow GPU in WSL.... 🌟🌟🌟🌟

  • @parthsen1681
    @parthsen1681 10 місяців тому +3

    hello after the import tensorflow step its telling me to that TENSOR RT Not found , how do i fix this

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

      I am have same problem

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

      It is optional to install this library. If you want to install it check out the documentation

  • @omsonawane2848
    @omsonawane2848 11 місяців тому

    Thanks for such an accurate information. It'll just take time to setup wsl2. Remaining all steps are very easy.

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

    not working
    i think the problem is where the anaconda is getting installed there python is not got installed and when i try to run my code anywhere it says "tensorflow is not added"

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

      Did you follow all steps? As described in the video description.

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

    Very nice vid bro it helped me a lot.

  • @praveenm5723
    @praveenm5723 11 місяців тому +1

    OMG thank you so much saved a lot of time :)

  • @GenesisChat
    @GenesisChat 11 місяців тому +1

    It feels like it works, the computer doesn't use 100% of its capacity to computer anymore. But the GPU usage still seem to be very low (8%). Maybe it's the training task that doesn't allow for enough parallelization, I'll keep trying.

    • @GenesisChat
      @GenesisChat 11 місяців тому +1

      My best guess is that all the errors at 10:50, which are the same I have, indicated the computer is still NOT able to use GPU and can only use CPU, which defeats the whole purpose of going into wsl in the first place as the standalone Windows does the same...

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

    Not worked for me:
    tensorflow/core/common_runtime/gpu/gpu_device.cc:2251] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU

  • @LNXWIN-x8o
    @LNXWIN-x8o Рік тому +2

    May I know where you installed CUDA toolkit and cuDNN, inside or outside WSL2?

  • @Andrea-du3or
    @Andrea-du3or 8 місяців тому +3

    For those having the error " tensorflow/core/common_runtime/gpu/gpu_device.cc:2251] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU " when listing the GPUs, I fixed it by downgrading tensorflow to 2.15 version by running the command pip install tensorflow==2.15 ; then I saw another problem : it appeared that my GPU was not detected by the listing, to fix this, just go to your nvidia panel -> 3D parameters -> manage 3D parameters and select your GPU in the preferred Graphic Processor Option.

  • @ManojKoncha
    @ManojKoncha 10 місяців тому +2

    When i try to import tensorflow module in notebook it shows error- "no module named tensorflow"

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

      Did you fix it?

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

    Thx very much, working 100%

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

    He can find tensorflow when I run in terminal but when i move to jupyter he can not find. He say "No module named 'tensorflow'", and vedio don't run tensorflow in jupyter as example either. Can anyone help me please?
    maybe is this error : [IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version
    I found out that the version of python in terminal is different with the version in jupyter?why?

  • @u2gilles
    @u2gilles 3 місяці тому

    "On WSL" is not shown when setting the interpreter in Pycharm. I am stucked. Any idea? Thanks

  • @kirannchelak
    @kirannchelak 5 місяців тому

    can we work on pycharm by this ? as you are downloading jupyter notebook can i write pycharm?

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

    incredible! thank you!

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

    I have an issue whereby all that you show works if I run ubuntu app, but not from cmd -> wsl, then conda is not discovered, but if I start ubuntu it is there

  • @weiwang-e2x
    @weiwang-e2x 4 місяці тому

    At 11 minutes and 20 seconds in the video, the prompt: Unable
    to register cudnn... that is it normal?

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

    Brdr I followed all the steps and everything looked the same as in the video but still when i tried to run gpu in my jupyter notebook it tells no GPU

  • @ghostplays5291
    @ghostplays5291 11 місяців тому

    I am using windows native also my gpu discoverable but it shows jit compilation failed when running some code

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

    For some reason I keep getting Out of Memory error when I try with WSL. Tensorflow (GPU) works perfectly with Windows, however I get the out of memory error when I try Tensorflow (GPU) on WSL. appreciate your guidance

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

      I am also facing same kind of problem. If you could solve it please educate me

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

    Can you help me? I tried to import tensorflow in jupyter notebbok, but mistaked appeared "No module named tensorflow". I tried to use pip install in notebook, it said that Requirement already satisfied. What is the problem?

    • @CODEToGetHer-rq2nf
      @CODEToGetHer-rq2nf Рік тому

      Did you find solution ?

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

      Which environment are you using? Make sure you have activated your environment before using jupyter notebook. Use conda activate base

    • @CODEToGetHer-rq2nf
      @CODEToGetHer-rq2nf Рік тому

      @@KGPTalkie yes i followed your every step also "conda activate .....". Still I'm facing this issue

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

      Ok. Just to confirm. Activate your environment then type there python.
      Once you enter in python shell. Import tensorflow there. Let me know if that works.

    • @CODEToGetHer-rq2nf
      @CODEToGetHer-rq2nf Рік тому

      @@KGPTalkie I did as you said in powershell and tensorflow is running but when I run it in jupyter-notebook it is showing "No module named".

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

    Thanks. I wanna buy you a coffee ☕

  • @bencox695
    @bencox695 11 місяців тому +1

    awesome video

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

    Cannot we install tensorflow directly in our windows environment?

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

    please help mine returns an empty list and i have tried all the possible solutions i saw online I need help please

  • @nathanneve
    @nathanneve 11 місяців тому

    Thank you so much man!

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

    worked almost perfectly, just had to run some pip install tensorflow --upgrafe to make it work. Is it possible to connect my VSC instance on my desktop to my laptop and use my GPU from remote?

    • @ShahnazMalik.
      @ShahnazMalik. Рік тому

      Use ssh in terminal within vs code from remote laptop to connect to remote machine

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

    it says can not locate jupyter~notebook package and couldnt install
    (py310) root@name:~# jupyter~notebook
    Command 'jupyter~notebook' not found, did you mean:
    command 'jupyter-notebook' from deb jupyter-notebook (6.4.8-1ubuntu0.1)
    Try: apt install
    (py310) root@name:~# sudo apt install jupyter~notebook
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    E: Unable to locate package jupyter~notebook

  • @MdArbaazKhan-z2c
    @MdArbaazKhan-z2c Рік тому

    What about nvidia driver
    Is it same in other case of tensorflow or i have to install other os based driver

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

      Windows version. you need to install on your windows pc.

  • @EshwarShiva-v3x
    @EshwarShiva-v3x 10 місяців тому

    It's showing gpu 0 which is my intel uhd graphic card but i want to use my gpu 1 which is nvidia graphic card,,...
    How to switch to gpu 1

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

      I have the same issue, did you solve it?

    • @EshwarShiva-v3x
      @EshwarShiva-v3x 10 місяців тому

      @@iagirre yeah bro actually gup 0 is nvidia by default, but in task manager it's shows GPU 0 is Intel and GPU 1 is nvidia this is different okay..
      And if u get GPU 0 after running whole commonds in powershell then u can good to go, and if u want to run jupyter notebook or vs code then use this below command
      code .
      Then it will download vs code for u and after that u can execute ur .py and .ipynb file in it.
      After this click on run, then select tf-gpu as ur environment. That's it

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

      @@EshwarShiva-v3x in my case I solved this by choosing the nvidia gpu as the default one in nvidia control panel

  • @AJ-qg7xj
    @AJ-qg7xj Рік тому

    Hi, Thanks for this wonderful video. I need some help. I followed the tutorial and everything worked except when you import the pandas ? I installed the same way like you did, but even after that it is showing "ModuleNotFoundError: No module named 'pandas'" Can you explain me whats the problem here ?

    • @ShahnazMalik.
      @ShahnazMalik. Рік тому

      Select the environment in which you installed pandas and then try to import pandas

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

      Any new package installed is not being found in jupyter-notebook. Try another one, sklearn for example. However, if you check on the terminal (with the rigth enviroment) it is there. I am openning the jupyter-notebook on the rigth enviroment as well. So, what is wrong? And, what is the solution?

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

    no matches found: tensorflow[and-cuda]

  • @GamingAmbienceLive
    @GamingAmbienceLive 11 місяців тому +2

    i spent 7 days on trying to install this cancer, if this video doesnt help i will delete everything
    you did not show how you install cudnn, what versions of things, i am impressed this worked but i am deep in the toilet with the setup i give up

    • @KGPTalkie
      @KGPTalkie  11 місяців тому

      Don't worry. If this doesn't help let me know. I can connect and help you

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

      i figured it out thank you for offering, installing this stuff alone is way too much effort, good luck to anyone trying to work with this outside of stragight forward school projects@@KGPTalkie

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

    Hello your video really helped me but ended kidna early.
    How to import the Kernel in VSC? And do i need an extra command to run my model with my GPU?
    And where do i find my folder cause i wanna import a csv.

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

      Please watch last 2 minutes carefully. I have shown this.

  • @MdArbaazKhan-z2c
    @MdArbaazKhan-z2c Рік тому

    Brother nano .bashrc
    I can't get same output

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

      Please share timestamp of the video where you are matching content. And what is your file's content

    • @MdArbaazKhan-z2c
      @MdArbaazKhan-z2c Рік тому

      7:59

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

    sudo command is not working can you help me with that

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

      What error are you getting? You can proceed without sudo as well.

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

    thank you very much . How can I connect it to Spyder?

  • @unpaired-electron
    @unpaired-electron Рік тому +1

    Thank you! it worked for me without any errors😁. I followed through another video but it was 9 month old and got so many errors.
    But I have one problem. All libraries are importing fine but as I compile my model the kernel dies. Is it because of insufficient memory as I have 8 gigs ram and by default wsl is allocated 4 gigs.

    • @Songoku-hg6bc
      @Songoku-hg6bc 8 місяців тому

      did you fix your error? I am facing the same error, can you tell me if you fixed it

    • @unpaired-electron
      @unpaired-electron 8 місяців тому

      @@Songoku-hg6bc Yes, in my case RAM was the problem. To make sure you can check error messages or check the computer resources while running your model.
      You can check if your model works on Google Colab, it offers good understandability of computing resources.

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

      @@Songoku-hg6bc I am facing the same error. The kernel dies

  • @mentalgaming2739
    @mentalgaming2739 11 місяців тому +5

    Its Show GPU : 0 which means it not Taking ke GPU1 MAIN GPU

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

    If someone has problems with internet. Don't use USB internet from phone. Use phone internet with Wifi i.e hotspot!

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

    Nice tutorial. I have veen looking for a way to use WSL with VS Code. Thanks.

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

    it did not work

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

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

    This tutorial doesn't even work. Kinda garbage.

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

    dookie ahh tutorial

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

    errors kon tera papa yani mai solve karunga

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

      Please mention which error and at what timestamp? Won't disturb my father for this small issue. Btw thanks for watching.

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

    Brdr I followed all the steps and everything looked the same as in the video but still when i tried to run gpu in my jupyter notebook it tells no GPU

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

    Thanks a lot man!!