Platform Already Registered With Name "METAL"

I was trying to install both Tensorflow for Mac OS along with the Metal plugin on my 2019 16 inch Macbook Pro. They both install successfully when using pip however when trying to import Tensorflow, I end up getting the message below. Does anyone know what might be causing this and how to fix it?

2021-07-13 18:23:39.214473: F tensorflow/c/experimental/stream_executor/stream_executor.cc:823] Non-OK-status: stream_executor::MultiPlatformManager::RegisterPlatform( std::move(cplatform)) status: Internal: platform is already registered with name: "METAL"

This issue was happening with older version of Tensorflow base version. But with the tensorflow-macos, this issue was fixed. Is it possible that installation of some python package pulled in an older version of the Tensorflow base version which is causing this mismatch?

Can you create a new venv and try the steps in https://developer.apple.com/metal/tensorflow-plugin/:

python3 -m venv ~/tensorflow-metal
source ~/tensorflow-metal/bin/activate
python -m pip install -U pip
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal

With this are you able to import tensorflow ?.

I ran into the same problem today, and the reply you got didn't solve it for me. Were you able to run it sucessfully?

I confirm that I had the same problem today. I followed the steps in https://developer.apple.com/metal/tensorflow-plugin/ to install the packages on a brand new M1 Max MacBook, so I assume I am not affected by old packages.

Xcode: 14.1 (14B47b) macOS: 13.0.1 (22A400) Chip: Apple M1 Max MacOS SDK: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk

Platform Already Registered With Name "METAL"
 
 
Q