Install Tensorflow 2 on a Raspberry Pi 4 // Easy

Поделиться
HTML-код
  • Опубликовано: 24 окт 2024

Комментарии • 140

  • @vjreviewsandiy
    @vjreviewsandiy 4 года назад +20

    It is sad that Tensorflow do not have clear instruction on installing Tensorflow . Thanks for your help.

  • @Ash_Industries
    @Ash_Industries 4 года назад +8

    That final moment when he tries to "import tensorflow" was amazing. I know exactly how he feels. Great vide. thanks I was searching forever how to get this done, and ALL the resources where filled with random unique situations that had nothing to do with my issues!

    • @SamWestby
      @SamWestby  4 года назад +1

      Thank you! That's exactly why I made this video. It took me wayyyyy to long to figure this out

  • @josephattard_PIC_Spartan6_Zynq
    @josephattard_PIC_Spartan6_Zynq 2 года назад +1

    Hi Sam, i am experiencing an error with numpy for wheels. can you confirm which numpy version you are using? I am assuming also that python version is 3.7. Also you seemed to omit installing numpy in the virtual environment, are you using numpy 1.21.6? kindly confirm. thanks so much

  • @varshathguptas3164
    @varshathguptas3164 4 года назад

    Thanks a lot for helping me to install tensorflow in raspberry pi for more than 2 weeks. Now after seeing your video i done it within 30 mins ... Thanks for uploading this valuable video..🙏🙏🙏

  • @tomlocke2558
    @tomlocke2558 3 года назад

    Seriously awesome. I struggled for ever to get keras to work on ipython in my Raspberry. I followed your instructions and used Tensorflow 2.3 and it works great. Thanks so much for this. I would suggest adding a ETH or BTC address for those who want to tip in your profile.

    • @SamWestby
      @SamWestby  3 года назад

      Thanks Tom! I'm happy I could help :)

  • @speedracer1968
    @speedracer1968 4 года назад +1

    Dude, you rock. Just installed Tensorflow version 2.3.0, and now I have a new virtual environment "env" on my Desktop (in sub /tf_pi). Really, thank you so much for the video, you earned a new sub. Happy coding! :o

    • @SamWestby
      @SamWestby  4 года назад

      Thanks! Let me know if there are any other videos you'd like me to make

    • @pradiptananda5964
      @pradiptananda5964 2 года назад

      I can't install tensorflow on my rpi 4 having 64 bit os.. Just got it freshly os installed.. How to proceed.. Any idea please

  • @ABirdi
    @ABirdi 3 года назад

    Thank you so very much my guy, I am new to Pi's and have been stuck for hours trying to get this simple stage completed

  • @garceling
    @garceling 3 года назад

    literally I had the same look on ur face, when I finally got it to install. thx u sm

  • @jorgesandoval839
    @jorgesandoval839 4 года назад +1

    I am getting an error at the time of installing tensorflow after the wget command, what I get is: tensorflow-2.0.0-cp37-none-linux_armv7l.whl is not supported wheel on this platform. Is it because my python in the virtual env is 3.6.6?

    • @SamWestby
      @SamWestby  4 года назад

      Yes you need to use Python 3.7

  • @hugosalbidea
    @hugosalbidea 3 года назад

    Thank you!! Now I have installed tensorflow 2.4.0 on my raspberry 2. Perfect tutorial, congratulations

  • @sgodsellify
    @sgodsellify 4 года назад +2

    There is now version v2.1.0, which was released a few days ago (March 17, 2020).
    Just change the 2 reference numbers of 2.0.0 to 2.1.0 for the wget.

    • @SamWestby
      @SamWestby  4 года назад

      Thanks for the update!

  • @dishantgandhi6007
    @dishantgandhi6007 3 года назад

    Hi there, how can I add tensorflow-text. Since when I try to install it it say no matching distribution found for tensorflow-text sys_platform != Win32.
    Pip version: 21.1.2
    Python: 3.7.3
    Tensorflow: 2.3.0
    I installed tensorflow by your method it worked but tensorflow text I don't know how to do that. Can you help me out?

  • @rambo2981
    @rambo2981 3 года назад

    Sam, thank you! I have been trying to get tensorflow installed/working on my pi zero W for days. Your method seems to work. Now I'm off to get my model built and tested. Thanks again for sharing this!

  • @BrianThomas
    @BrianThomas 2 года назад

    I like your content and your channel, but the question. Why would you choose to install TensorFlow on a raspberry Pi? And not a device that has an NPU? Forgive me if I misunderstand what TensorFlow is for but isn't that for machine learning?

    • @SamWestby
      @SamWestby  Год назад

      It is for machine learning, but some applications don't require fancy machinery. If you are training small models or deploying pre-trained models, the Raspberry Pi works great!

    • @BrianThomas
      @BrianThomas Год назад

      @@SamWestby interesting. Thank you for responding. It looks like it might be worth taking a small course in machine learning.

    • @SamWestby
      @SamWestby  Год назад

      @@BrianThomas Definitely!

  • @3DWithLairdWT
    @3DWithLairdWT 3 года назад

    Got 2.4.0 to work on my RPi 4 from this tutorial. Thanks!

  • @GrowingTogether_Word
    @GrowingTogether_Word 2 года назад

    Thanks so much Sam. I have been trying to install Tensorflow on my rip 4 for so long. It worked.
    Please does anyone know how I can install keras

  • @xizhu6553
    @xizhu6553 4 года назад

    i installed tensorflow==1.14,but when i import tensorflow ,it will output an error says that "E tensorflow/core/platform/hadoop/hadoop_file_system.cc:132] HadoopFileSystem load error: libhdfs.so"
    if i ignore it .tensorfow seems can be used normally. how can i fix it . i noticed that you have gaven an existed soultion that to build a virtual env.but my project can not use virtual env. do you have another soultion?

  • @حسامعليان-ي3ل
    @حسامعليان-ي3ل 3 года назад

    Please help i run ur commands but when i run the install command it's didn't work so please some help here the error (tensorflow.....it not supported wheel on this platform )

  • @gharibferiel2554
    @gharibferiel2554 3 года назад

    I didn't create a virtual env before installing TensorFlow dependencies, should I uninstall it? and if yes how?

  • @jhuliuscastillosuarez3324
    @jhuliuscastillosuarez3324 4 года назад +1

    Thanks!!!!!!!!
    I just installed the 2.3 version following your instruction :)

    • @SamWestby
      @SamWestby  4 года назад

      I'm happy I could help :)

  • @shreyaskulkarni705
    @shreyaskulkarni705 3 года назад

    Hi Sam! I was installing TF on the virtual env on Pi. When I execute the last command, it says ' Could not install package due to EnvironmentError: No such file or directory '. Can you please help me with this?

  • @OpenYoureyes304
    @OpenYoureyes304 2 года назад

    Question, if its in a virtual environment how can you make a program work if the tensor is in a seperate environment?

  • @OceanLovers3
    @OceanLovers3 2 года назад

    i get this error :ERROR: tensorflow-2.2.0-cp37-none-linux_armv7l.whl is not a supported wheel on this platform.

  • @zakzeaxer4868
    @zakzeaxer4868 4 года назад +1

    Hi ! Thanks for this ! But doing "virtualenv env", i have the error "command not found", does someone understand that ?

    • @SamWestby
      @SamWestby  4 года назад

      Try a Google search for "how to create a virtualenv python"

  • @Bat_OfGotham
    @Bat_OfGotham 3 года назад

    My pi cannot find the command virtualenv, is there perhaps a new version ?

  • @delicate6930
    @delicate6930 4 года назад

    Thank you! but when installing the packages, why did you use sudo on
    "sudo apt-get install -y openmpi-bin libopenmpi-dev
    " and
    "sudo apt-get install -y libatlas-base-dev",
    my understanding was that when using sudo it installs outside of the environment so are these packages meant to be out of the enviroment? or does it just work differently with apt-get?

    • @SamWestby
      @SamWestby  4 года назад

      I had to read up on this.
      I'm pretty sure the sudo command is required for a direct download using apt-get. If I didn't want to use sudo, I could compile the package from source, but that is a few extra commands.
      From what I understand, apt-get is a tool to install OS related packages, and virtualenv is a tool to isolate Python environments. So a virtualenv will never be able to isolate packages installed using apt-get.
      If you're looking to contain packages downloaded using apt-get, I think "chroot" would be the direction to go. (I haven't used this before but SO told me so.)

  • @junjielim6734
    @junjielim6734 2 года назад

    ERROR: tensorflow-2.0.0-cp37-none-linux_armv7l.whl is not a supported wheel on this platform.
    I followed the instructions but still got this error after several attempts. May I know how to solve it?

    • @SamWestby
      @SamWestby  2 года назад

      I made a 2022 update for this tutorial last week. There are a couple differences so that could be a good place to start ruclips.net/video/QLZWQlg-Pk0/видео.html

  • @jm10oct
    @jm10oct 3 года назад

    why do you require the specific versions for h5py and keras_applications and keras_preprocessing?

  • @Montabouargoub
    @Montabouargoub 4 года назад +3

    Great tutorial! This is very helpful :)

    • @SamWestby
      @SamWestby  4 года назад

      Thank you Montassar!

  • @jonelhong7312
    @jonelhong7312 3 года назад

    I have an error of "can't uninstall wrapt" in last command. How should I fix it?

  • @FalseDev
    @FalseDev 4 года назад

    In a virtual environment the --user is not applicable as it doesn't require any specific installation configuration as it's installed within the environment

  • @MrSpark05
    @MrSpark05 4 года назад

    Hello There,
    First of all, thanks for your video!
    Secondly, could you pls tell me how to load the virtual environment in Mu or any other code editor?
    Thanks
    Sandor

    • @SamWestby
      @SamWestby  4 года назад +1

      Hi I load the virtual environment in the terminal then run code from the terminal

  • @Mikesukes
    @Mikesukes 2 года назад

    Do you have any recommendations on getting this to install on bullseye?
    I am getting a wheel not supported on this platform error.

    • @SamWestby
      @SamWestby  2 года назад

      Some things have changed since I published this video. I recently made an updated video here: ruclips.net/video/QLZWQlg-Pk0/видео.html

  • @newbiespkr2154
    @newbiespkr2154 3 года назад

    Thank you. Hope likes, comment and view are enough to repay your kindness

  • @SigmaC
    @SigmaC 3 года назад

    thanks a lot!!!!!!!!!! almost gave up turns out I was installing the wrong version

  • @mcmuffin8784
    @mcmuffin8784 4 года назад

    Thanks 😎 you are doing gods work my dude had the same emotions when i imported tensorflow on python lol

  • @Abhijithkm05
    @Abhijithkm05 3 года назад

    can we try this procedure on raspberrypi 3?

  • @allenyu4054
    @allenyu4054 3 года назад

    Successful on my pi . Thanks

  • @yijun5409
    @yijun5409 4 года назад

    May I ask you,why the system says:[ModuleNotFoundError: there is no module named tensorflow],what is the problem? thank you.

    • @SamWestby
      @SamWestby  4 года назад

      This means your don't have tensorflow installed. Did everything go okay with the installation?

  • @dineshsoni6708
    @dineshsoni6708 3 года назад

    Great job Dear very clear each n everythings. goodluck!! thank you so much

  • @fremaxter
    @fremaxter 4 года назад

    Awesome worked for me tensorflow 2.3.0
    Thanks a lot :)

  • @dhrubojyotidey8267
    @dhrubojyotidey8267 4 года назад

    while training my model I'm facing the following error on my terminal!
    2020-03-31 19:39:53.793083: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 188160000 exceeds 10% of system memory.
    Can you please suggest me how to increase my virtual environment memory?

    • @SamWestby
      @SamWestby  4 года назад +1

      You need to decrease your batch size. This is a memory issue with your device, not environment

    • @dhrubojyotidey8267
      @dhrubojyotidey8267 4 года назад

      @@SamWestby I'd like to know deeper about this problem if you can help me, like if the RAM is responsible or the micro SD card. And if the latter is the issue if I can extend the storage with any USB drive

  • @benzindani8540
    @benzindani8540 2 года назад

    in 1:23 after I write virtualenv env it says command not found

  • @warrenharper
    @warrenharper 3 года назад

    Thanks Sam! Found this via the picar tutorial.

    • @SamWestby
      @SamWestby  3 года назад

      You're welcome Warren! What is the picar tutorial?

    • @warrenharper
      @warrenharper 3 года назад

      @@SamWestby towardsdatascience.com/deeppicar-part-3-d648b76fc0be you made linked your video in one of the comments. Did you end up making a Pi Car?

    • @SamWestby
      @SamWestby  3 года назад +1

      That's cool! Here's what I ended up making ruclips.net/video/hJQgWvXT5p0/видео.html

    • @warrenharper
      @warrenharper 3 года назад

      @@SamWestby Rad!

  • @furkanbaydar5706
    @furkanbaydar5706 9 месяцев назад

    thanks man! you are the best! you saved my life thank you

  • @wimharris-ryden3234
    @wimharris-ryden3234 4 года назад

    im kind of new to this, using a pi 3 when I install tensorflow it returns that it is not a supported wheel on this platform any idea what of what I doing wrong?

    • @SamWestby
      @SamWestby  4 года назад

      If you followed my step-by-step tutorial, I'm not sure. Sorry

  • @salahdanial4588
    @salahdanial4588 3 года назад

    Hello, I managed to download version 2.0.0, but I need some help in downloading 2.3.0. Can anyone help me with the exact commands

  • @MzhdaSaeed
    @MzhdaSaeed 4 года назад

    really thank you i have installed from yours, tf version 2.3 on my pi

    • @melvyn7376
      @melvyn7376 3 года назад

      how ? i have only the 2.0.0 version

  • @dhrubojyotidey8267
    @dhrubojyotidey8267 4 года назад

    An issue I'm facing is that I can't figure out how to program or train a model using TensorFlow in my Pi 4. Can you please help me out? thank you.

    • @SamWestby
      @SamWestby  4 года назад +1

      Is your issue learning Tensorflow, or is your issue learning Tensorflow for your Pi 4?

    • @dhrubojyotidey8267
      @dhrubojyotidey8267 4 года назад

      @@SamWestby My issue is to learn tensoflow on raspberry Pi 4 as I don't have a windows PC. I am also very eager to learn the concepts of tensoflow also. Also I am keen to know how to make/train a training model. Thanks

    • @SamWestby
      @SamWestby  4 года назад +1

      I recommend checking out www.tensorflow.org/learn
      You don't need a fancy computer to start learning

    • @dhrubojyotidey8267
      @dhrubojyotidey8267 4 года назад

      @@SamWestby I did check and found that I need a full tensoflow version (not lite) to create a model then I can transfer the model to tensoflow lite format. I do require a demo like video where I can create a training model in full tensoflow. So in a sense I am facing touble training models. Apart from that can I update the tensoflow 2.0.0, which you showed in this video to 2.1.0 (the current version) in my Raspberry Pi 4? I have the 4 GB model.

    • @dhrubojyotidey8267
      @dhrubojyotidey8267 4 года назад

      @@SamWestby while training my model I'm facing the following error on my terminal!
      2020-03-31 19:39:53.793083: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 188160000 exceeds 10% of system memory.
      I was following the official tutorial at tensorflow.org as you guided. The problem rose while I was making the def epoch programming. I checked over 10 times but the same prompt was shown to me every time. Can you please guide me through this? Thanks.

  • @persistence_of_vision
    @persistence_of_vision 4 года назад

    Thanks, that worked for me really helped a lot.

  • @cryptorick9825
    @cryptorick9825 3 года назад

    Hey Sam, when I use the "virtualenv env" command it says command not found. What should I do?

    • @SamWestby
      @SamWestby  3 года назад

      Try installing virtualenv with pip by running "python3 -m pip install virtualenv"
      If it says something along the lines of "installed virtualenv successfully" then "virtualenv env" should work now

    • @cryptorick9825
      @cryptorick9825 3 года назад

      @@SamWestby Yeah I got it to work, I had to logout, thank you!

  • @heluan7030
    @heluan7030 4 года назад +1

    Thank you for sharing!

  • @priyankapaudel8985
    @priyankapaudel8985 3 года назад

    Thankyou. This works !!

  • @yehyaNot
    @yehyaNot 3 года назад

    Thanks mate you heleped a lot

  • @nryalife2459
    @nryalife2459 2 года назад

    Tensorflow is not supported wheel on this platform

  • @danielrosas2240
    @danielrosas2240 3 года назад

    Thank u so much bro! Greetings from México!

  • @michaelmutekeri8770
    @michaelmutekeri8770 4 года назад

    It works like a charm... thanx mate

  • @SiddhanthPRao
    @SiddhanthPRao 4 года назад

    ERROR: Package 'mock' requires a different Python: 3.5.3 not in '>=3.6'
    I'm getting the above error. Can you please help me out?

    • @SamWestby
      @SamWestby  4 года назад

      You need a higher version of Python. You need Python 3.6 for that package, but you actually need Python 3.7 for this tutorial

    • @SiddhanthPRao
      @SiddhanthPRao 4 года назад

      @@SamWestby Okay I did that but now I am getting this error:
      ERROR: tensorflow-2.0.0-cp37-none-linux_armv7l.whl is not a supported wheel on this platform.

    • @SamWestby
      @SamWestby  4 года назад

      @@SiddhanthPRao Are you using Python 3.7 and a Raspberry Pi 2-4?

    • @SiddhanthPRao
      @SiddhanthPRao 4 года назад

      @@SamWestby I'm using the Rpi 3b+ and have upgraded to python 3.7

    • @SamWestby
      @SamWestby  4 года назад

      @@SiddhanthPRao sorry I'm not sure what the error is then :( I'm not an expert at this stuff

  • @ivantrejo133
    @ivantrejo133 3 года назад

    Bro, you saved my life rn! Thanks!!

  • @Kst-uw8be
    @Kst-uw8be 4 года назад

    Minor correction: for final testing, instead of "tensor.__version__" it should be: "tensorflow.__version__". Otherwise, great tutorial!

    • @SamWestby
      @SamWestby  4 года назад

      Just changed that. Thanks!

  • @musuyaba
    @musuyaba 4 года назад +1

    Firstly, I used this tutorial in Ubuntu Mate, its difficult to install h5py and grpcio.
    Now, install raspOS, python 3.7, follow this tutorial, E A Z Y

  • @MayankBhardwaj-fy7ge
    @MayankBhardwaj-fy7ge Год назад

    Thank You so much dude success :)

  • @diluxlachu
    @diluxlachu 4 года назад

    great video...... i have founf=d this tutorial after long search

  • @Scadb
    @Scadb 3 года назад

    Thanks!

  • @haopinglin
    @haopinglin 3 года назад

    Lifesaver man. Thank you very much.

  • @김동현-f1k4c
    @김동현-f1k4c 3 года назад

    쌤!!! 정말 고마워요!!!

  • @Mel674637
    @Mel674637 4 года назад

    Hey!
    Can I install keras, pandas, Opencv, nltk in raspberry pi?

    • @SamWestby
      @SamWestby  4 года назад

      Hi yes you can!

    • @sanjaybhatikar
      @sanjaybhatikar 4 года назад +1

      Melissa, yes you can install those with “sudo pip3 install” on Raspbian OS.

  • @bshyerr938
    @bshyerr938 4 года назад +1

    Thank you, Sir.

  • @vietquangtran3489
    @vietquangtran3489 4 года назад

    thanks so much!

  • @erikpalacios7238
    @erikpalacios7238 3 года назад

    you are the best!!!!!

  • @OceanLovers3
    @OceanLovers3 2 года назад

    what can I do

  • @xavierrenegadeangel6203
    @xavierrenegadeangel6203 3 года назад

    sonofagun it worked. thank you!

  • @cristhian4513
    @cristhian4513 4 года назад

    great videoooo :)!!!

  • @REGNiZZ
    @REGNiZZ 4 года назад +1

    U should live stream. On twitch

  • @saliouseck4263
    @saliouseck4263 4 года назад

    THANK IT WOKS FOR ME

  • @tonyassi
    @tonyassi 4 года назад

    is this 64 bit OS?

    • @SamWestby
      @SamWestby  4 года назад +1

      Nope 32 bit raspbian

  • @mazenothman1032
    @mazenothman1032 3 года назад

    Thanks man saved me a hell of a time

  • @somj5740
    @somj5740 3 года назад

    No working

  • @АлексейБеляков-ь5в
    @АлексейБеляков-ь5в 3 года назад

    Спасибо!

    • @SamWestby
      @SamWestby  3 года назад +1

      Пожалуйста!

  • @anasfarhaoui5063
    @anasfarhaoui5063 4 года назад

    bravo bravo

  • @KixMayne91
    @KixMayne91 3 года назад

    Thank you so much for this.

  • @sweetlife334
    @sweetlife334 4 года назад

    Thank you, work for me..!