How to install TensorFlow in Windows - 2024 Guide

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

КОМЕНТАРІ • 101

  • @RELUvance
    @RELUvance  8 місяців тому +5

    I hope this video helped you with your TensorFlow installation - it still surprises me how [unnecessarily] difficult it can be to get installed properly, especially with the GPU. Please reply and let me know which method worked for you!

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

      Liked, commented, and commenting here to tell you thank you from the bottom of my heart!

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

      would ykou tell me its help anaconda shell

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

      @@mdabubakarchowdhurysunny2846 sorry, I don’t understand what you are asking

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

      @@RELUvance i want to ask you tensorflow gpu doesn"t install conda environment , would yoiu like to tell us how i used install conda

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

      @mdabubakarchowdhurysunny2846 At 5:21 in the video it explains how to install miniconda, which is a “lite” version of the full anaconda.

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

    I've spent literally the whole day trying to get a working version of TF set up on my PC after Google withdrew the free colab GPU support. This video has been a lifesaver! Thank you so much for taking the time to make it!

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

      I'm so glad that I could help! And sorry to those who have recently posted comments saying that they are still running into issues.... it's frustrating that Tensorflow can be so difficult to get working properly.

  • @ML5563-p9t
    @ML5563-p9t 5 місяців тому +4

    You are a wizard, Man! That's the simple and full installation guides, that are so necessary for beginners, like me!👍👍👍

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

    I have followed the steps up to minute 11:16 but there is a problem at step minute 11:16 I can't import tensorflow as ft on gpu. Module Import Failure: The error occurred while importing TensorFlow modules. Specifically, TensorFlow attempted to use _pywrap_bfloat16.TF_bfloat16_type(), which is likely related to the bfloat16 data type.
    Python Version Compatibility: The error suggests that TensorFlow is having trouble converting a function return value to a Python type, indicating an issue with compatibility between TensorFlow, Python, or the environment setup (e.g., CUDA/cuDNN versions if using a GPU).
    Environment Issue: If you are using a GPU, the error might stem from an incompatible CUDA version or missing dependencies. Help Me Tn.

  • @jamiewolpert6069
    @jamiewolpert6069 3 місяці тому +4

    Man you just saved my degree in 20 minutes, thank you so much!

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

      Glad I could help!

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

    Really appreciate this content. I have been trying to download Tensor Flow all the day. Really thankssss

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

    You just helped me overcome the current, biggest roadblock I had to starting my ML/AI journey. I and my daughters thank you, endlessly.

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

      I'm so glad that I could help!! Yes, TensorFlow is one of the most important packages you need to get started, and it's one of the hardest to get working properly... which method did you end up using from the video?

  • @shashankbhutiya9236
    @shashankbhutiya9236 5 місяців тому +3

    Explained using Multiple methods, Is the best part for me.

  • @venietvideo
    @venietvideo Місяць тому +2

    Success with a tweak on 2024-12-21:
    I tried the Windows native versions and succeeded with both tf-cpu and tf-gpu. Two remarks:
    1. tf-cpu works fine with python=3.12 too
    2. tf-gpu needs python=3.9 and this tweak: pip install "numpy

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

      Glad it helped… yes the reason I made this video was because I had gone through a week of frustration myself!

  • @akashgarg5770
    @akashgarg5770 5 місяців тому +1

    Thank you so much, I was struggling for 2 days before I found your tutorial.

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

    At GPU TensorFlow Installation in Docker running ' import tensorflow as tf ', I get 'Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered,' and similar responses for cuDNN and cuBLAS. How do I fix this?

  • @siddharthghantasala4209
    @siddharthghantasala4209 9 днів тому

    I was doing method 2 and I followed all the steps, but at the "pip install tensorflow" part, it said "No matching distribution found for tensorflow". Does anyone have any ideas as to what to do here?
    UPDATE : Turns out I just used a python version that's apparently too new. That was my bad. I redid the thing using python 3.9 but I was wondering if I have to like delete anything or change anything I've already done

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

    You are golden! Thank you verry much for all the teachings it was a great help in my academic works. May you have many nice days - as many as you saved my days from tears and sorrows with this tutorial! Cheers!

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

      I’m glad you enjoyed!

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

    Hi everyone !
    TY for the tuto 🙂
    If the hello-world dont work for you (like me), try this !
    sudo update-alternatives --config iptables
    Enter 1 to select iptables-legacy
    sudo service docker start, and Docker will start as expected! You can now see [OK] at the end of the line 😉

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

    after installing tensorflow gpu how to access it from the jupyter notebook as there is jupyter pre install in my pc through ananconda and in same command line i installed tensorflow but i was anable to get it on my jupyter notebook how to do it please help me out

  • @icontrolthespice
    @icontrolthespice 2 місяці тому +1

    the only tutorial that worked for me

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

    I am extremely new to this space. I just started neural networks and my processing times in google colab has been humungous. I figured its because its not using my gpu eventhough i use the t4gpu runtime. So i went with this tutorial and downloaded the docker and completed every step and it works. But how can I now use my jupyter notebook file?

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

      There’s a different docker file you can use that includes Jupyter notebook… scroll through the comments a bit and you’ll find the one where I responded to someone else… use that command

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

    I have got all the installation done. how can i use it from jupyter notebook?

  • @NowshinAlam
    @NowshinAlam 5 місяців тому +2

    Thank you very much for your guide! It helped me a lot to set up the latest tensorflow gpu version in windows. Finally my GPU is showing up when importing tensorflow.👍
    However, I'm getting 3 warnings, saying "Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered" and 2 mores similar messages with cuDNN and cuBLAS. Have you ever encountered such messages?

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

    Do you have the commands that you are typing to install ternsorflow ? I am to blind to see anything :(

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

    At the Windows GPU installation, " import tensorflow as tf," you have to downgrade "numpy" to version 1.

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

      Did you find a solution, I am also getting the same thing

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

      @@nidhalabidi You can downgrade using the --upgrade flag it works both ways e.g
      pip install --upgrade numpy==1.10.1

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

      @@tmusic99 thank you!

  • @Cavz001
    @Cavz001 5 місяців тому +1

    Great video! Can I install TF in a venv on cmd prompt instead of conda?

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

      Yes you can use venv too.

  • @Warley.Araujo
    @Warley.Araujo Місяць тому +1

    Great Video Sir!!

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

    i have a laptop with intel iris xe graphics, integrated gpu can i run tensorflow?

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

    I followed all these steps for CPU and GPU and I am still getting errors when I try to import tensorflow :(

  • @peterbrunner6608
    @peterbrunner6608 4 місяці тому +1

    Hi Dustin first thank you for a logical step by step video listing different methods in one video. Question: did you add any paths to the Enviroment Variables in Windows ? thanks again 👌

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

      Hi Peter, no, I didn’t make any changes to windows paths.

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

      @@RELUvance Okay thank you !

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

    Thank you! That's the only tutorial that worked for me. However, I just wanna know if it is possible to run VScode in the method3/docker.

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

    If it is input(print( tf.config.list_physical_devices('GPU')) ) it comes empty( [] ). What is the reason?

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

      It means that it is not detecting/using a GPU.

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

      There is only a dedicated GPU on my computer. There is no shared GPU. How can I solve it?
      If there is no shared GPU, would I install both the native Windows CPU-only TensorFlow installation and the native Windows GPU-enabled TensorFlow installation? Or install the native Windows GPU-enabled TensorFlow installation?

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

      @@hadiuzzaman4632 Have you tried both of the last two methods that I show in the video? Tensorflow can be very finicky... if one way doesn't work then you might need to try another.

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

    i just wanted to know whether we have to use docker run - -gpus all -it -v $PWD:/working -w /working tensorflow/tensorflow:latest-gpu bash, every time we reopen the linux shell after closing it or ??is there another way to go about it ,also to run the req python script we have use the above mentioned cmd and then call the script ?or is there some other way to do this

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

      There are actually many ways to work with docker containers but I tried to keep the video simple and just showed this one example. For example, you can actually instantiate a docker container as a "daemon" with this command: docker run --gpus all -dit --name tf -v $PWD:/working -w /working tensorflow/tensorflow:latest-gpu bash
      This will cause the container to be persistent even after stopping the process or restarting the computer, and can be re-started by using: docker attach tf (replacing tf with whatever name you used in the preceding command.
      To run a script immediately instead of launching the container as a shell you can replace "bash" as follows: docker run - -gpus all -it -v $PWD:/working -w /working tensorflow/tensorflow:latest-gpu python [script name here]
      Hope this helps! As you can see it gets complicated depending on what you want to do, and this was beyond what I wanted to cover in the video. Let me know if you think a separate video on using docker would be helpful, and I might be able to make one.

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

      @@RELUvance thanks for the clarification
      Also a video on using docker for python scripts via the vscode or any other ide would be helpful

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

    should I install TensorFlow native CPU and GPU versions together or only one of them is allowed?

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

      If you are installing them via conda or docker like I showed in the video you can install them both if you want because they will be in separate environments. I would only install the gpu version though if you are planning on running really compute intensive models. Otherwise the cpu version will be fine on its own.

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

    Wow, this is great, I have a question though, what about working with notebooks? Is there a way to be able to run it from vscode? The kernel isn't explicitly shown prolly 'cuz it's in a container. I've seen some tutorials about using the "WSL" and "Dev Containers" extensions but am still experimenting as to how to make them all work together. Still, I'm thankful that I found a tutorial that could utilize newer versions of TF. Edit: This is with regards to the Docker TF Installation

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

      Hi @daedalusrasmus3278 - glad that you found it helpful! Yes, there's a docker version of TensorFlow that uses notebooks as well, but to be honest I haven't tried using VScode with it through docker. To open a notebook version in a docker container, use this:
      docker run --gpus all -p 8888:8888 -it tensorflow/tensorflow:latest-gpu-jupyter
      ... and then you can access the notebook from a web browser.

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

    After doing this, can i use tensorflow in jupyter lab?

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

      Yes, if you run Jupyter from within the Tensorflow environment you created.

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

    Why did you use python version 3.9 for the windows for tensorflow installation?

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

      That’s the version that is officially supported by the version of tensorflow being installed.

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

      @@RELUvance After installing the tensorflow and using jupyter notebook, when I run the following code cell, I get the error - The kernel appears to have died. It will restart automatically. Do you have any solution for this?
      Code:
      linear_layer = tf.keras.layers.Dense(units=1, activation = 'linear', )
      a1 = linear_layer(X_train[0].reshape(1,1))
      print(a1)

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

    how can I use this in visual studio community?

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

      The 2nd method I shows in the video actually has python installed natively in Windows so you should be able to fire up VS and use it directly within windows. For the docker use-case, it may be a bit more challenging because python and tensorflow are inside of a docker container. It's probably still possible, but I haven't explored this myself.

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

    finally a latest video . thank u dude

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

      Yeah that’s why I made it… all the other videos are so out of date.

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

    As I understand there is no more version 2.10 available, as I get this (tf-gpu) PS C:\Users\edgar> pip install tensorflow==2.10
    Defaulting to user installation because normal site-packages is not writeable
    ERROR: Could not find a version that satisfies the requirement tensorflow==2.10 (from versions: 2.16.0rc0, 2.16.1)
    ERROR: No matching distribution found for tensorflow==2.10

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

      Hi Edgar, are you using the command I used in the video? (pip install "tensorflow

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

    Which is the best method among these 3?

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

      Option 2 is the best if you don’t need the absolute latest gpu version (most people).

  • @Luminate-mn7cf
    @Luminate-mn7cf 7 місяців тому +1

    thats sad caz many new lib req new version of tensorflow or keras , btw it worked . tq sir!

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

      Glad it worked for you!

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

    excellent...this video helped me a lot

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

      Fantastic!

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

      @@RELUvance sir, can you please show how to install Tensorflow+GPU on WSL2 environment without dockers help

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

      Yes, I am planning to make a separate video on that.

  • @martinamilo6153
    @martinamilo6153 5 місяців тому +1

    Thanks alot.. would have preferred if the video was a little bit clearer.. although it was very helpful and precise..

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

    Thank you for this video...

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

      No problem! Hope that it helped you.

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

    thank you

  • @adrianarcega1691
    @adrianarcega1691 5 місяців тому +2

    Thank you so much, you saved me HAHAHAH

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

      You're welcome!!

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

    it works well

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

    you are amazing

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

    i have a laptop with intel iris xe graphics, integrated gpu

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

      You need an Nvidia graphics card for the GPU-enabled version to work.

  • @Psykh-e
    @Psykh-e 8 місяців тому +1

    👑

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

    its cpu version

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

      In the video I explain how to install both the gpu and cpu versions. Maybe I don’t understand your comment?

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

      @@RELUvance can you solve problem in my next comment

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

    Thank you for you sharing this video.
    Every thing worked well and the same as you showed in this tutorial, but the "import tensorflow as tf" resulted in an error.
    file"c:......pywarp_tensorflow.py" line 70 in ...
    import error: Dll load failed while importing _pywrap_tensorflow_internal: a dynamic link library (DLL) initializiation routine failed.....

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

    When i tried to run the sample script to verify whether the docker works, it said: "docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
    See 'docker run --help'.", will this cause any issues?, i can always run it via 'sudo service docker start' tho

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

      If you can run with sudo but not without, it sounds like setting up the user profile like I showed in the video didn’t work properly. Did you get any error messages when doing that? Try rebooting the computer too if you haven’t already.

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

    I truly appreciate it.

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

      I’m glad it helped!

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

    Install tensorflow Bible thank you!🎉 Method 3 help me a lot

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

      So glad that it worked for you!