Тёмный

TensorFlow on M1/M2 (Apple Silicon) - How to install TensorFlow on Macbook in 10 minutes 

Bhavesh Bhatt
Подписаться 105 тыс.
Просмотров 47 тыс.
50% 1

In this video, I'll show you a step by step guide on how to Install TensorFlow on Apple Silicon Macs (M1 or M2 chip) and take advantage of its GPU. The Process works for M1, M1 Pro, M1 Max, M1 Ultra and M2.
▶ Sponsor me on GitHub : github.com/spo...
▶ Join this channel to get access to perks: bit.ly/Bhavesh...
▶ Join the Telegram channel for regular updates: t.me/bhattbhav...
▶ If you like my work, you can buy me a coffee : bit.ly/BuyBhav...
*I use affiliate links on the products that I recommend. These give me a small portion of the sales price at no cost to you. I appreciate the proceeds and they help me to improve my channel!
▶ Best Book for Python : amzn.to/3qYThqu
▶ Best Book for PyTorch & Machine Learning : amzn.to/3PyUkdy
▶ Best Book for Statistics : amzn.to/3vzvHEn
▶ Best Book for BERT: amzn.to/3lpX0fz
▶ Best Book for Machine Learning : amzn.to/2P6aZuT
▶ Best Book for Deep Learning : amzn.to/30UMTGl
▶ Best Intro Book for MLOps : amzn.to/3AoPZmM
Equipments I use for recording the videos:
▶ 1st Laptop I use : amzn.to/3AqI8Fp
▶ 2nd Laptop I use : amzn.to/3KAiYsB
▶ Microphone : amzn.to/3qUPxtz
▶ Camera : amzn.to/3rKQsM2
▶ Mobile Phone : amzn.to/3nRHP1f
▶ Ring Light : amzn.to/33LedM5
▶ RGB Light : amzn.to/3KzLgmS
▶ Bag I use : amzn.to/3AsM3RZ
If you do have any questions with what we covered in this video then feel free to ask in the comment section below & I'll do my best to answer those.
If you enjoy these tutorials & would like to support them then the easiest way is to simply like the video & give it a thumbs up & also it's a huge help to share these videos with anyone who you think would find them useful.
Please consider clicking the SUBSCRIBE button to be notified for future videos & thank you all for watching.
You can find me on:
▶ Blog - bhattbhavesh91...
▶ Twitter - / _bhaveshbhatt
▶ GitHub - github.com/bha...
▶ Medium - / bhattbhavesh91
▶ About.me - about.me/bhatt...
▶ Linktree - linktr.ee/bhat...
▶ DEV Community - dev.to/bhattbh...
▶ Telegram - t.me/bhattbhav...
#tensorflow #applesilicon #macbook

Опубликовано:

 

15 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 130   
@saumyaranjannayak2101
@saumyaranjannayak2101 9 месяцев назад
If you are facing some errors try using these commands: conda config --add channels conda-forge conda config --set channel_priority strict conda create -y --name cv conda activate cv conda install -y -c apple tensorflow-deps python -m pip install tensorflow-macos python -m pip install tensorflow-metal Thanks for making this video btw!
@7Lucifer16
@7Lucifer16 8 месяцев назад
I couldn't have done it without you. Thank you so much❤.
@drakesadosky6203
@drakesadosky6203 8 месяцев назад
I am still getting the 'PackagesNotFoundError: The Following packages are not available from current channels: - tensorflow-deps'
@sarahverster7060
@sarahverster7060 2 месяца назад
I did this and everything installed beautifully but I am still getting a dead kernel when I try to install tensorflow in a juypter notebook. Any suggestions? I'm at my wits end!
@dobiminarikova
@dobiminarikova Месяц назад
I keep getting an error: cannot execute a binary file. Could anyone support me on this?
@rtne9804
@rtne9804 Год назад
You saved me ! the last part of your tuto is gold ! After trying lots of tutos i always end up with incompatibility issues ! Thanks you !
@bhattbhavesh91
@bhattbhavesh91 Год назад
Glad I could help!
@eletronicloop6743
@eletronicloop6743 Год назад
PackagesNotFoundError: The following packages are not available from current channels: - tensorflow-deps
@drakesadosky6203
@drakesadosky6203 8 месяцев назад
I am also getting this, did you ever get it resolved?
@sudiptoshuvro1594
@sudiptoshuvro1594 5 месяцев назад
did you solve it?
@drakesadosky6203
@drakesadosky6203 5 месяцев назад
Use google collab instead. Don’t need local libraries
@drakesadosky6203
@drakesadosky6203 5 месяцев назад
@@sudiptoshuvro1594google collaboratory IDE has all packages
@srinivasnaidupasyavula5832
@srinivasnaidupasyavula5832 4 месяца назад
any solution?
@ashie4239
@ashie4239 Год назад
Thank you so much. You saved me. I watched so many videos but I couldn't; able to make it work. This was really helpful.
@bhattbhavesh91
@bhattbhavesh91 Год назад
You're welcome!
@spilledbeans3462
@spilledbeans3462 3 месяца назад
Thanks a lot Bhavesh, I had setup a virtual env on my MacBook Pro (M3) for TensorFlow but it was so confusing. Finally found your video and successfully installed and set-up everything.
@bhattbhavesh91
@bhattbhavesh91 3 месяца назад
You are welcome!
@JitenderKumar-lh8pd
@JitenderKumar-lh8pd Год назад
Thank You so much.i watched almost 10-15 videos and thought I made a mistake in buying new apple Mac due to compatibility issue.
@aayushtare1915
@aayushtare1915 Год назад
Thanks dude have been trying to do this since the past 2 hrs finally it worked, now my brain is going to go on cooldown for the rest of the day
@kg_loves
@kg_loves 6 месяцев назад
This is the best video/tutorial on installing TensorFlow in M1. Thank you so much.
@bhattbhavesh91
@bhattbhavesh91 6 месяцев назад
You are welcome!
@danieldixon418
@danieldixon418 Год назад
oh. my. god. finally. thank you so much Bhavesh! I have spent hours trying to figure out why my anaconda environment import has not been working! I am beginning to learn neural networks, and this has helped me solve a problem that has plagued me today!
@danielsaragih
@danielsaragih Год назад
My brother, there is already docker. Dont need to install tf or any hard external library/package directly on our machine. Just setup from ubuntu/light linux setup, then prepare the environment for tensorflow requirements. That way are more fail-safe than trying to install directly to our native platform
@shalvink9720
@shalvink9720 Год назад
it fails on solving environment, tries three times that flexible solve etc and fails, bro can you please help me
@bhaskarjitborah112
@bhaskarjitborah112 10 месяцев назад
I followed your process for installation, can you please help me with this problem . "UnsatisfiableError: The following specifications were found to be incompatible with each other: Output in format: Requested package -> Available versions
@BillBurrUniversity
@BillBurrUniversity Год назад
lifesaver! thanks dude.
@bhattbhavesh91
@bhattbhavesh91 Год назад
Glad it helped!
@yuqingpan9782
@yuqingpan9782 Год назад
Thanks so much! you also save me! I got stuck with this problem for quite a while but now it's working... although the plots looks a bit funny now, but it's nothing compared with Tenorflow!
@andrebarata1428
@andrebarata1428 Год назад
Worked just fine, thank you. How do run tensorflow on VScode after setting up this env?
@prashantvarshney3325
@prashantvarshney3325 2 месяца назад
Thanks!
@KunalSingh-yz8ec
@KunalSingh-yz8ec 4 месяца назад
Great content
@bhattbhavesh91
@bhattbhavesh91 4 месяца назад
Glad it was helpful!
@imvarunvats
@imvarunvats 28 дней назад
Bhavesh, I currently use a laptop which has an integrated graphic card by intel(basic one),and the time of doing a project using tensorflow n keras libraries, it has shown the potential and literally it didn't even fetch me an output in 3 hours. Now because I ll be working on machine learning/deep learning projects, I need to buy a laptop, would you suggest me one laptop which satiate my need, should I buy just another win + rtx GPU laptop or m2?
@martinaaron7304
@martinaaron7304 8 месяцев назад
nice, thx for sharing, I watched a lot of videos, this tutorial finally helped me.
@bhattbhavesh91
@bhattbhavesh91 8 месяцев назад
Glad it helped
@digitalnomad2196
@digitalnomad2196 7 месяцев назад
This works in 2024
@aliejaz6529
@aliejaz6529 2 месяца назад
Hey, for my m1 mac its using the CPU and not the gpu. Its not even detecting GPU. what should I do?
@nanduugee
@nanduugee Год назад
Thanks a lot. Had been struggling for a while now
@bhattbhavesh91
@bhattbhavesh91 Год назад
Glad it helped
@pasindushavinda4455
@pasindushavinda4455 Год назад
Finally Worked Form Me !! Thank You..
@korshm
@korshm Год назад
I did all, but got in the end >>> tf.__version__ '2.11.0' >>> gpu=len(tf.config.list_physical_devices("GPU"))>0 >>> gpu False >>> tf.config.list_physical_devices("GPU") [] >>>
@mountaindrew_
@mountaindrew_ Год назад
hello, after trying to install tensorflow dependencies it says: Found conflicts! Looking for incompatible packages. and then it searches for all those incompatible packages and never reaches the point that you show in the video.
@JohanC222
@JohanC222 Год назад
I have the same issue, did you manage to solve it?
@louisa123
@louisa123 Год назад
@@JohanC222 same here! could you solve it?
@throne_darkmetal
@throne_darkmetal 10 месяцев назад
Is the 8GB base version good enough for Tensorflow or Pytorch?? I was wondering if the swap usage would be too high if i choose base version. I would really appreciate your opinion.
@kilikorbi
@kilikorbi Год назад
Hi Bhavesh, very nice Video. Worked directly for me on my Mac Ultra! Could you give me a hint how to install tensorflow inside Suse Tumbleweed Linux that runs inside Parallels inside this Mac Ultra?
@ericyan3000
@ericyan3000 8 месяцев назад
rock star!
@jiteshprajapati36
@jiteshprajapati36 4 месяца назад
Any comment about M3 pro... I'm trying to install directly (without anaconda) but tensorflow-metal is showing errors related to no-matching distribution found...
@rohanmahajan6333
@rohanmahajan6333 Год назад
this doesnt work for me: says PackagesNotFoundError: The following packages are not available from current channels: - tensorflow-deps
@sudiptoshuvro1594
@sudiptoshuvro1594 5 месяцев назад
could you solve it?
@rohanmahajan6333
@rohanmahajan6333 5 месяцев назад
@@sudiptoshuvro1594 yes you need to create a virtual environment.
@anapaunovic8405
@anapaunovic8405 Год назад
how to use it in pycharm?
@premnathart3496
@premnathart3496 Год назад
Same doubt 😅
@tarunjaikumar9058
@tarunjaikumar9058 Год назад
Thanks so much, this video helped me a lot!!
@bhattbhavesh91
@bhattbhavesh91 Год назад
You're welcome!
@amankumardwivedi4139
@amankumardwivedi4139 Год назад
how to run it on Anaconda navigator o jupyter lab ??
@Harish-ou4dy
@Harish-ou4dy 6 месяцев назад
Always getting this message while installing tensorflow-deps Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve. Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
@magnets8264
@magnets8264 Год назад
hey Bhavesh, I m having problem in installing tensorflow-text please can u make a video on it
@thatsalot3577
@thatsalot3577 11 месяцев назад
for some reason I'm not able to install tensorflow-deps in base, and getting this error 'UnsatisfiableError: The following specifications were found to be incompatible with each other: Output in format: Requested package -> Available versions' my platform is showing arm64, 64bit
@jatink7402
@jatink7402 10 месяцев назад
Exactly same How did u resolve it?
@thatsalot3577
@thatsalot3577 10 месяцев назад
@@jatink7402 I haven't, I created a new env and installed it there
@bhargavapothakamuri4218
@bhargavapothakamuri4218 8 месяцев назад
Hello there, I am trying to learn ML and python. Can I use Mac book for it ? Should I purchase a windows laptop ?
@luisaceo00
@luisaceo00 8 месяцев назад
Is there a way of doing this without using conda? I'd much rather use poetry instead
@nayabmalik6064
@nayabmalik6064 11 месяцев назад
hello bhavesh after this code ....... conda install -c apple tensorflow-deps i am not able to go further as it is showing Collecting package metadata (current_repodata.json): done Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve. Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source. Collecting package metadata (repodata.json): done Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve. Solving environment: \ Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed UnsatisfiableError: The following specifications were found to be incompatible with each other: Output in format: Requested package -> Available versions what should i do next i am very tired now i wanted desparetly to install tensorflow please help
@user-cu6xc4oe5r
@user-cu6xc4oe5r 2 месяца назад
Hello, I need deepxde. How can I download it
@ayushshekhar5973
@ayushshekhar5973 Год назад
this was helpful.thanks
@bhattbhavesh91
@bhattbhavesh91 Год назад
Glad it was helpful!
@ElinLiu0823
@ElinLiu0823 Год назад
How is performance goes sir?Is that quicker than RTX4080 Mobile? Wondering replace my RTX2060 laptop these days
@parakh.17
@parakh.17 9 месяцев назад
thnks a lot buddy 🙌
@bhattbhavesh91
@bhattbhavesh91 9 месяцев назад
Welcome 😊
@jacoblee2210
@jacoblee2210 Год назад
you got me on tensorflow CPU not GPU... perhaps I did something wrong but I don't think so. I used miniconda not anaconda, and I installed xcode_cmd_tools on z shell not the global base conda shell.
@ildabukva5079
@ildabukva5079 Год назад
You are the best!!!!!!
@bhattbhavesh91
@bhattbhavesh91 Год назад
Thank you 🙏
@yulongwang3324
@yulongwang3324 Год назад
IT WORKS!!
@imamahasan904
@imamahasan904 10 месяцев назад
good video, Thanks you.
@bhattbhavesh91
@bhattbhavesh91 10 месяцев назад
Thanks for watching!
@rahulsinha8647
@rahulsinha8647 Год назад
Clean, straight to the point. You're the best bro.
@user-mk4nz6rv3x
@user-mk4nz6rv3x Год назад
error: could not find a version that satisfies the requirement tensorflow (from versions: none)
@bearcataquatic
@bearcataquatic Год назад
I need to download tensor flow 2.10.0 but I keep getting 2.9.2. I'm not sure what I'm doing wrong
@leenakhadke1097
@leenakhadke1097 8 месяцев назад
How to solve this error. Please help: Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve. Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source. Collecting package metadata (repodata.json): done Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve. Solving environment: | Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed UnsatisfiableError: The following specifications were found to be incompatible with each other: Output in format: Requested package -> Available versions
@Mind_Link
@Mind_Link Год назад
I need a help installing transformers andbtemsornflor on my mac intel
@eshantdas1237
@eshantdas1237 Год назад
Thank Youuuuuuu!!!!!!!!! So much.....
@bhattbhavesh91
@bhattbhavesh91 Год назад
You're welcome!
@snxwyt1818
@snxwyt1818 Год назад
Thank u sm ✨
@bhattbhavesh91
@bhattbhavesh91 Год назад
You are welcome
@plavali_znaem
@plavali_znaem 10 месяцев назад
which version of python do you use to it works?
@Ferhuc
@Ferhuc Год назад
amazing thanks a lot
@bhattbhavesh91
@bhattbhavesh91 Год назад
Glad you liked it!
@lamlamnguyen7093
@lamlamnguyen7093 Год назад
Metal device set to: Apple M1 Epoch 1/10 2023-05-08 20:30:31.220724: W tensorflow/tsl/platform/profile_utils/cpu_utils.cc:128] Failed to get CPU frequency: 0 Hz I have this line, otherwise it works okay. Does anyone have more information?
@adamsalehbenkhalifa
@adamsalehbenkhalifa Год назад
God bless you!
@arsalanahmed7776
@arsalanahmed7776 Год назад
thanks brother
@bhattbhavesh91
@bhattbhavesh91 Год назад
Welcome
@srushtihirve
@srushtihirve Год назад
Hello , I tried doing the following Just in the end the GPU command returned false What should i do now??
@vodhavokstudios
@vodhavokstudios Год назад
Same issue, I have an M2 chip
@AshishTiwari-gm9hw
@AshishTiwari-gm9hw Год назад
why conda CLI ? why not graphical anaconda? will it be different if I choose to go with graphical based?
@navneetyadav8605
@navneetyadav8605 6 месяцев назад
Yes, CLI Anaconda is preferred by users who prefer the flexibility and efficiency of the command line interface.
@amreamer362
@amreamer362 Год назад
Awesome
@marcusgarvey8668
@marcusgarvey8668 Год назад
thumbs up to you man. 😁
@bhattbhavesh91
@bhattbhavesh91 Год назад
Appreciated!
@varakalavasanthroy-zb4ik
@varakalavasanthroy-zb4ik Год назад
Bruh after conda install -c apple tensorflow-deps it’s getting error in my MacBook pro
@jacobhayward6215
@jacobhayward6215 Год назад
same >:(
@Breeze07
@Breeze07 6 месяцев назад
will it run with python3?
@avdhantyagi
@avdhantyagi Год назад
Could not find a version that satisfies the requirement tensorflow-macos
@Ponder217
@Ponder217 Год назад
Need to be running Python 3.8 or 3.9 or 3.10, I believe. 3.11.2 gave me that error
@aryankesarwani8736
@aryankesarwani8736 Год назад
Wil it also work for Mac m2 air?
@LifeTakerSimo
@LifeTakerSimo Год назад
it didn't
@liho26
@liho26 8 месяцев назад
Your method doesn't work, man.... UnsatisfiableError: The following specifications were found to be incompatible with each other: Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system: - feature:/osx-arm64::__osx==13.6=0 - feature:|@/osx-arm64::__osx==13.6=0 - tensorflow-deps -> grpcio[version='>=1.37.0,=10.9'] Your installed version is: 13.6
@pankajraj5615
@pankajraj5615 Год назад
Would you recommend macbook air m2 16 gb for deep learning works like training a transformer. Please suggest
@deeek92
@deeek92 Год назад
Buy a simple windows laptop. Get subscription for Google Colab. Train your Deep Learning models there. Macbooks are the worst for machine learning and deep learning tasks. you can rather go for a windows gaming laptop if you really want to burn your money. Fastest would be a proper desktop with dedicated NVIDIA GPU. But think again, do you really want all that expenvise stuff? If you really want to go for a mac, look out for M1 air MacBook with 16gb RAM and 512gb SSD. It is good for everyday use. Then get yourself a subscription of Google Colab and train your models there. Macbooks are NOT for deep learning :)
@deeek92
@deeek92 Год назад
And the answer to your question is "NO! Do not buy MacBook Air M1/M2 for heavy tasks". They cannot offer sustained performance. And forget deep learning on these.
@user-of4qj3xc2j
@user-of4qj3xc2j Год назад
abhi dekhni chalu kari hai agar chl gai toh like kr dunga video
@MaanikiEx
@MaanikiEx Год назад
Chala kiya Bhai ??
@dayaalex8693
@dayaalex8693 Год назад
This worked for me, then the next day, i opened jupyter lab and problems came with library matching. it was fine in jupyter notebook but when the same notebook was opened in lab, a huge error popped up. I put that on chatGpt and it said that numpy version was inconsistent to tensorflow. Once that happened, tensorflow can't be imported anywhere( python-terminal, jupyter notebook, nor jupyter lab)
@DanFrederiksen
@DanFrederiksen Год назад
If you want ML power, why are you buying a laptop and a mac? I get that M2 is energy efficient but no way it can match a high end card
@ZeeshanAbuRayyan
@ZeeshanAbuRayyan Год назад
$$$
@DanFrederiksen
@DanFrederiksen Год назад
@@ZeeshanAbuRayyan isn't a laptop the more expensive option per performance though? adn word is the M2 overheats when it actually has to do something because it's a dainty laptop. a laptop is not a computer. it's a purse for girls.
@karanhadiyal65
@karanhadiyal65 Год назад
I will never buy Macbook again, even a simple thing can't be installed. I recommend all not to buy macbook.
@KRISHna-td6om
@KRISHna-td6om Год назад
same feeling bro...wasted money on this worst mac...feeling like break it🙆
@JHawke12
@JHawke12 2 месяца назад
Its so infuriating like why did they have to make it so annoying just to install the damm library
@second_lead_simp
@second_lead_simp Год назад
I would recommend all not to buy macbook it’s the worst investment i have ever done myself as a student of data science,to download simple thing i need to watch 100s of tutorials .😢
@PP-qw3yr
@PP-qw3yr Год назад
+1
@karanhadiyal65
@karanhadiyal65 Год назад
Same problem
@premnathart3496
@premnathart3496 Год назад
Same, it's not suited for machine learning also.
@islamicinterestofficial
@islamicinterestofficial Год назад
5:47 PackagesNotFoundError: The following packages are not available from current channels:
@mamdouhalmaitah116
@mamdouhalmaitah116 Год назад
same here using M2
@eletronicloop6743
@eletronicloop6743 Год назад
same here PackagesNotFoundError: The following packages are not available from current channels: - tensorflow-deps
@chloeclohosey960
@chloeclohosey960 Год назад
same
@DaleCarman
@DaleCarman Год назад
anyone find a solution for M2 install?
@shovanchowdhury3757
@shovanchowdhury3757 Год назад
Thank you so much.
@bhattbhavesh91
@bhattbhavesh91 Год назад
You're welcome!
Далее
Apple Silicon is back, but for which developers?
9:34
Просмотров 149 тыс.
How to Install TensorFlow GPU for Mac M1/M2 with Conda
11:35
MacOS Guide For Windows Users
16:42
Просмотров 109 тыс.
TensorFlow in 100 Seconds
2:39
Просмотров 955 тыс.
Windows on a Mac JUST got better
8:23
Просмотров 270 тыс.