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
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!