Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TensorFlow Metal not installable on M2 MacBook and Github page is down

I've been attempting to install tf metal on my computer so that I can use GPUs instead of CPUs. I have tf macOS installed already, and I am fully updated with pip and tf. I'm currently 2 months into building and training a tf CNN, and I'm at the point where training a single epoch for my network will take a week (I have a lot of data that I need to use). I desperately need to use GPUs but am stuck with CPUs for now. I can't get access to a cluster, so the best I can do is continue to use my M2 MacBook. Is there a way I can work around not being able to install tf metal?

I keep getting this error message: "ERROR: Could not find a version that satisfies the requirement tensorflow-metal (from versions: none) ERROR: No matching distribution found for tensorflow-metal"

I looked on apple forums, tried to download it from GitHub (the page is down), and anything else I could think of and/or find on the internet to help, but it still isn't installing.

I've used the following commands and still no luck:

  • python -m pip install tensorflow-metal
  • pip install https://github.com/apple/tensorflow_metal/releases/download/v0.5.0/tensorflow_metal-0.5.0-py3-none-any.whl
  • pip install tensorflow-metal
  • pip3 install tensorflow-metal
  • SYSTEM_VERSION_COMPAT=0 python -m pip install tensorflow-metal
  • SYSTEM_VERSION_COMPAT=0 pip install tensorflow-macos tensorflow-metal
  • conda install -c anaconda tensorflow-gpu

Any help would be appreciated! Thanks so much!

like image 475
Sofie Seilnacht Avatar asked Feb 01 '26 17:02

Sofie Seilnacht


1 Answers

I am a sysadmin that started as MLOPs, so please bear with me... This could be wrong... But I managed to install it using

  • Python 3.11 (brew vent)
  • a requirements.txt file to fix the following packages versions:
  • Tensorflow fixed to version 2.17 (2.17.1)
  • tensorflow-metal to 1.1.0 (latest, sep 2023...)
  • tf_keras 2.17.0

I do not use Conda. My company does not use it. But the packages version should be pretty similar a part of some dependencies I read people speaking about Conda (Conda install apple) (https://medium.com/@jarondlk/installing-tensorflow-metal-on-apple-silicon-macos-with-miniconda-f43121fe3054 as ONE example)

like image 126
lsoto Avatar answered Feb 03 '26 07:02

lsoto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!