I am trying to install Tensorflow on my MacBook Pro with the M1 chip. The operating system of my MacBook is MacOS Big Sur Version 11.0.
In order to install Tensorflow to use it with Python, I have followed this tutorial, which says that I have to do the following:
Install Homebrew.
Download MiniForge3 for macOS arm64 chips (link provided in the webpage).
Install MiniForge3 using:
chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh sh ~/Downloads/Miniforge3-MacOSX-arm64.sh source ~/miniforge3/bin/activate
Create a folder to set up an environment for Tensorflow.
mkdir tensorflow-test cd tensorflow-test
Make and activate Conda environment.
conda create --prefix ./env python=3.9.7 conda activate ./env
Install Tensorflow dependencies.
conda install -c apple tensorflow-deps python -m pip install tensorflow-macos python -m pip install tensorflow-metal
After this, I open a Jupyter Notebook and I try to import tensorflow, but this error shows up:
OSError: dlopen(/Users/blancoarnau/tensorflow-test/env/lib/python3.9/site-packages/tensorflow/python/platform/../../core/platform/_cpu_feature_guard.so, 6): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
Referenced from: /Users/blancoarnau/tensorflow-test/env/lib/python3.9/site-packages/tensorflow/python/platform/../../core/platform/_cpu_feature_guard.so (which was built for Mac OS X 12.3)
Expected in: /usr/lib/libc++.1.dylib
As you can see in this screenshot:
Do you have an idea why this is happening?