Tensorflow on OSX12.2: platform is already registered with name: "METAL"

I am aware this question has been asked before, but resolutions have worked for me. When I try to import TensorFlow on my python 3.9 environment I get the following error:

uwewinter@Uwes-MBP % python3

Python 3.9.10 (main, Jan 15 2022, 11:40:53) 
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> import tensorflow
2022-02-09 21:30:01.701794: F tensorflow/c/experimental/stream_executor/stream_executor.cc:808] Non-OK-status: stream_executor::MultiPlatformManager::RegisterPlatform( std::move(cplatform)) status: INTERNAL: platform is already registered with name: "METAL"
zsh: abort      python3

I have the newest versions of TensorFlow-macos and TensorFlow-metal installed:

uwewinter@Uwes-MBP % pip3 list | grep tensorflow        
tensorflow-estimator           2.7.0
tensorflow-macos               2.7.0
tensorflow-metal               0.3.0

OSX is latest:

uwewinter@Uwes-MBP % sw_vers 
ProductName:	macOS
ProductVersion:	12.2
BuildVersion:	21D49

Mac is a 2021 MBP

uwewinter@Uwes-MBP % sysctl hw.model
hw.model: MacBookPro18,3
  • Hey, I am facing a similar issue. I have the exact same versions. What are the possible reasons behind this?

Add a Comment

Replies

Follow the instructions here, it seems to be working: https://github.com/jeffheaton/t81_558_deep_learning/blob/master/install/tensorflow-install-mac-metal-jul-2021.ipynb

PS: I was facing a similar issue till a few minutes back.

The link is down 💀

here is a great explanation on stackoverflow as to why the issue arises (double initialization)

the remediation is to follow the following steps

pip uninstall tensorflow-metal
python3 -m pip install --user tensorflow-meta

Here is a great explanation on stackoverflow as to why the issue arises (double initialization) https://stackoverflow.com/a/71855912/20265869

the remediation is to follow the following steps

pip uninstall tensorflow-metal

python3 -m pip install --user tensorflow-metal