I have had a similar question and problem en MacOs 14.7. In the documentation of tensorflow from version 2.16 onwards it is recommended to use "pip install tensorflow" and not other methods. Note that when using conda or poetry this same failure occurs.
You can use the following lines as a guide, install Python 3.11 -or3.12 -version 3.13 is not yet supported by TF-, Tensorflow2.18 -or 2.17-, keras 3.8 and tensorflow-metal1.2 (tensorflow-macos and others are not required)
conda create -name <Environment Name> python 3.12.9
conda activate <Environment name>
pip install tensorflow==2.17 or 2.18 tensorflow-metal
conda install -c conda-forge <other package name>
verify to status:
python --version
python -c "import tensorflow as tf; import keras ; print(tf.__version__); print(keras.__version__)"
python -c "import tensorflow as tf; print(tf.config.list_physical_devices(‘GPU'))"
sure it will be useful and you can tell us if it works in MacOS15
Post
Replies
Boosts
Views
Activity
Hello!, I have had a similar question in MBP M1PRO (MacOS 14.7). These lines use conda environment, and install python 3.11 or 3.12, tensorflow in versions 2.17 or 2.18 and tensorflow-metal 1.2 (tensorflow-macos is not required since version TF 2.16)
You can use the following lines as a guide:
conda create -name <Environment Name> python 3.11.11 or 3.12.9
conda activate <Environment name>
pip install tensorflow==2.17 or 2.18 tensorflow-metal
conda install -c conda-forge <other package name>
to verify status intallation:
python --version
python -c "import tensorflow as tf; import keras ; print(tf.__version__); print(keras.__version__)"
python -c "import tensorflow as tf; print(tf.config.list_physical_devices(‘GPU'))"
I hope it will be useful to you and others.
Hi, I had a similar problem in M1Pro(14.7) to do ML/AI, after checking different combinations of python, tensorflow, keras environments, these steps allowed me to operate with more current versions TF2.17-2.18,keras 3.8 & python3.12
conda create -n <Environment Name> python 3.11.11 or 3.12.9
conda activate <Environment name>
pip install tensorflow==2.17 or 2.18 tensorflow-metal
conda install <other package name>
Automatic installation of tensorflow-metal 1.2
to check installation status:
python --version
python -c "import tensorflow as tf; import keras ; print(tf.__version__); print(keras.__version__)”
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('CPU'))”
python -c "import tensorflow as tf; print(tf.config.list_physical_devices(‘GPU'))"
In the tensorflow documentation from version 2.16 onwards it is recommended to use "pip install tensorflow" and not other methods like conda or poetry. I have tested it for CIfar100 and MNIST and the code in keras2 and keras3 works on the local machine.
You should see a similar result:
I hope you find it useful and successful!!
Hello, thanks to your question I came to the forum looking for a solution for a (local) This verification I did on a M1Pro::
You can use the following lines as a guide:
conda create -n <Environment Name> python 3.11.11 or 3.12.9
conda activate <Environment name>
pip install tensorflow==2.17 or 2.18 tensorflow-metal
conda install <other package name>
It will probably automatically install tensorflow-metal 1.2
to check versions and installation status:
python --version
python -c “import tensorflow as tf; import keras ; print(tf.__version__); print(keras.__version__)”
python -c “import tensorflow as tf; print(tf.config.list_physical_devices(‘CPU’))”
python -c “import tensorflow as tf; print(tf.config.list_physical_devices(‘GPU’))”
In the tensorflow documentation from version 2.16 onwards it is recommended to use
pip install tensorflow
and not other methods.
If you use conda or poetry an error occurs when using TF-2.17-2.18 with TF-Metal1.2 with python3.11 or 3.12 that actually prevents loading TF in the new versions
I confirm that you still need to install tensorflow-metal version1.1 or the new version1.2 (for TF and GPU usage in Apple Silicon)
Indeed it is stable TF2.18, Keras2.8 and Python 3.12 that I have been testing recently.
You should see a similar result:
Hello!,
I had the same concern as you some time ago, I had used windows and linux previously (I mean 2021 where was the MBP M1).
To tell the truth a MBP14 M4 is an excellent machine and the implementation of environments with conda or pip for Python as well as Pytorch and Tensorflow works really good for installing and doing initial code locally. There are tutorials and it is even possible to install tensorflow 2.17, keras 3.8 and python 3.12 without major problems, even so you should use an additional library tensorflow-metal 1.1 or more recent versions to perform GPU usage on your MacBook.
If you require more compute capacity for ML/AI/NLP/LLM's a MBP14 M4 will run out of capacity, due to the amount of GPU's.
I hope to help with your inquiry