tensorflow-plugins/libmetal_plugin.dylib, 6): Symbol not found: _TF_AssignUpdateVariable

I installed tensorflow-mac and tensorflow-metal on an iMac 2021 27" running Big Sur with an AMD Radeon Pro 5700 XT. I am running Python 3.8.5

(tensorflow-metal) (base) davidlaxer@x86_64-apple-darwin13 ~ % pip list

Package                 Version             Location

----------------------- ------------------- -------------------------
...
tensorboard             2.5.0

tensorboard-data-server 0.6.1

tensorboard-plugin-wit  1.8.0

tensorflow              2.5.0

tensorflow-estimator    2.5.0

tensorflow-hub          0.12.0

tensorflow-macos        2.5.0

tensorflow-metal        0.1.1

tensorflow-text         2.5.0

When I try to import tensorflow I get this error:

 % ipython

Python 3.8.5 (default, Sep  4 2020, 02:22:02) 

Type 'copyright', 'credits' or 'license' for more information

IPython 7.24.1 -- An enhanced Interactive Python. Type '?' for help.



In [1]: import tensorflow

---------------------------------------------------------------------------

NotFoundError                             Traceback (most recent call last)

<ipython-input-1-d6579f534729> in <module>

----> 1 import tensorflow



~/tensorflow-metal/lib/python3.8/site-packages/tensorflow/__init__.py in <module>

    447     _plugin_dir = _os.path.join(_s, 'tensorflow-plugins')

    448     if _os.path.exists(_plugin_dir):

--> 449       _ll.load_library(_plugin_dir)

    450       # Load Pluggable Device Library

    451       _ll.load_pluggable_device_library(_plugin_dir)



~/tensorflow-metal/lib/python3.8/site-packages/tensorflow/python/framework/load_library.py in load_library(library_location)

    152 

    153     for lib in kernel_libraries:

--> 154       py_tf.TF_LoadLibrary(lib)

    155 

    156   else:



NotFoundError: dlopen(/Users/davidlaxer/tensorflow-metal/lib/python3.8/site-packages/tensorflow-plugins/libmetal_plugin.dylib, 6): Symbol not found: _TF_AssignUpdateVariable

  Referenced from: /Users/davidlaxer/tensorflow-metal/lib/python3.8/site-packages/tensorflow-plugins/libmetal_plugin.dylib

  Expected in: flat namespace

Given that you are seeing missing symbols like _TF_AssignUpdateVariable, it means that you have a mismatch between tensorflow and the metal plugin. You need to make sure to install tensorflow-macos using:

python -m pip install tensorflow-macos

See https://developer.apple.com/metal/tensorflow-plugin/ for details.

tensorflow-plugins/libmetal_plugin.dylib, 6): Symbol not found: _TF_AssignUpdateVariable
 
 
Q