Tensorflow on M1 Mac - Symbol not found: _OBJC_CLASS_$_MPSGraphCompilationDescriptor

Hello here. I try to install Tensorflow on my M1 Mac. Here is how I install :

chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh
sh ~/Downloads/Miniforge3-MacOSX-arm64.sh
source ~/miniforge3/bin/activate

conda install -c apple tensorflow-deps

python -m pip install tensorflow-macos

python -m pip install tensorflow-metal

When I run :

python
import tensorflow as tf

I got this error :

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/Users/floriane/miniforge3/lib/python3.9/site-packages/tensorflow/__init__.py", line 449, in <module>

    _ll.load_library(_plugin_dir)

  File "/Users/floriane/miniforge3/lib/python3.9/site-packages/tensorflow/python/framework/load_library.py", line 155, in load_library

    py_tf.TF_LoadLibrary(lib)

tensorflow.python.framework.errors_impl.NotFoundError: dlopen(/Users/floriane/miniforge3/lib/python3.9/site-packages/tensorflow-plugins/libmetal_plugin.dylib, 6): Symbol not found: _OBJC_CLASS_$_MPSGraphCompilationDescriptor

  Referenced from: /Users/floriane/miniforge3/lib/python3.9/site-packages/tensorflow-plugins/libmetal_plugin.dylib (which was built for Mac OS X 12.0)

  Expected in: /System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Versions/A/MetalPerformanceShadersGraph

I try to find some issues on forum but I didn't find. Somebody can help me ? Thank you

  • I have the same issue.

Add a Comment

Replies

Hi @FloEss,

Which OS version are you testing this on? We recommend moving to the latest beta or to the release version 12.1. That should fix the issue you are seeing.

  • I have the same issue and my OS version is BigSur 11.6. I wonder if there is a suitable tensorflow-macos version for BigSur?

Add a Comment

Hi ! Thank you for your reply. I have 11.6 OS version. I will try after update my OS version

  • hi , can you show me what is happing with you after update os verison

Add a Comment

I have the same issue, is there any update for this? Thanks.

Same issue for me running on MacOS 12.0.1 with python 3.8 as recommended here: https://caffeinedev.medium.com/how-to-install-tensorflow-on-m1-mac-8e9b91d93706

I am having the exact same problem. I am running on MacOS 12.0.1 with python 3.9. Any updates?

exactly the same issue.