0

I am getting the following error after I have installed tensorflow using conda. The error is as follows

    Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/homebrew/Caskroom/miniforge/base/envs/tensorflow/lib/python3.10/site-packages/tensorflow/__init__.py", line 440, in <module>
    _ll.load_library(_plugin_dir)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/tensorflow/lib/python3.10/site-packages/tensorflow/python/framework/load_library.py", line 151, in load_library
    py_tf.TF_LoadLibrary(lib)
tensorflow.python.framework.errors_impl.NotFoundError: dlopen(/opt/homebrew/Caskroom/miniforge/base/envs/tensorflow/lib/python3.10/site-packages/tensorflow-plugins/libmetal_plugin.dylib, 0x0006): Symbol not found: _OBJC_CLASS_$_MPSGraphRandomOpDescriptor
  Referenced from: /opt/homebrew/Caskroom/miniforge/base/envs/tensorflow/lib/python3.10/site-packages/tensorflow-plugins/libmetal_plugin.dylib
  Expected in: /System/Library/Frameworks/MetalPerformanceShadersGraph.framework/Versions/A/MetalPerformanceShadersGraph

I used the installation guide presented in the link attached which caters to the installation process for MacOS -> https://github.com/jeffheaton/t81_558_deep_learning/blob/master/install/tensorflow-install-mac-metal-jan-2023.ipynb and created a separate conda environment where I did the library installations. This error is displayed in the same environment

When using the command conda list, I was able to see the tensorflow libraries that have been installed as shown in the screenshot below. In spite of this, I am getting the above error. I also tried restarting my computer and it is throwing the same error.

My system is as follows

  • Apple M1 Pro Chip
  • MacOS Monterey
  • Python version : 3.10.8

enter image description here

Please do let me know if I have to make any other changes/install any other software to make tensorflow work. Thank you in advance for your help!

adhok
  • 391
  • 2
  • 16
  • 1
    You probably need to update your OS, check the required versions here: https://developer.apple.com/metal/tensorflow-plugin/ – Dr. Snoopy Jan 29 '23 at 11:36
  • Hi @adhok, Did you try the above commented solution? or Please refer to this [link](https://stackoverflow.com/a/76289118/21904865) to install tensorflow in Mac OS if you are still facing the issue. – TF_Renu Patel Jul 05 '23 at 06:57
  • Hi @TF_RenuPatel. Apologies for the late reply. I updated my MacOS version to make this work. I had an older version. – adhok Aug 17 '23 at 04:29

0 Answers0