Same. Multiple attempts with fresh installs of Monterey, Xcode, Miniforge etc. Used the tensorflow-deps==2.5.0 suggestion found on another thread here. Everything acted like it installed happily. Can launch python. Can't import tensorflow.
(tf_macos) ...MacBook-Pro ~ % uname -m
arm64
(tf_macos) ...MacBook-Pro ~ % python
Python 3.9.7 | packaged by conda-forge | (default, Sep 23 2021, 07:30:24)
[Clang 11.1.0 ] on darwin
import tensorflow as tf
zsh: killed python
Post
Replies
Boosts
Views
Activity
Update: I had success using the approach and scripts posted to GitHub by ctrahey and linked in this related thread. Haven't yet installed all the packages I want or tried to run my neural nets, but at least I can launch python, import tensorflow, and get back "Running TensorFlow 2.5.0 with 1 GPUs recognized".
I have successfully resolved this issue.
First, as mentioned in my comment above, I abandoned the instructions provided by Apple and went with the approach and scripts linked in the comment above, posted by @ctrahey in another thread. That allowed me to at least import tensorflow, but then I had a runtime error with pandas. Based on the stack trace I examined my python, numpy, and pandas packages. Python and numpy were installed by Conda-forge. Pandas was installed by pip. You see where I'm going here...
% conda list | grep numpy
numpy 1.19.5 py39h1f3b974_2 conda-forge
% conda list | grep pandas
pandas 1.3.1 pypi_0 pypi
I uninstalled just the pandas package, reinstalled it using Conda instead of pip and now
% conda list | grep pandas
pandas 1.3.3 py39h7f752ed_0 conda-forge
I can import numpy, tensorflow, and pandas without crashing Python, but better yet, I can compile and call model.fit() on my functional model. Back in the business of training my neural net! Thanks @ctrahey for providing the way forward
Here's my experience as of 18 March 2022. Able to install arm64 tensorflow and tensorflow-text and successfully execute the Tensorflow Word Embeddings tutorial found here==> https://www.tensorflow.org/text/guide/word_embeddings. (I downloaded the notebook and ran locally in jupyter)
Create a new virtual environment for this purpose:
conda create --name tf_text python=3.8
conda activate tf_text
conda install -c apple tensorflow-deps -y
pip install tensorflow-macos
pip install tensorflow-metal
conda install -c conda-forge jupyter jupyterlab -y
Download tensorflow_text-2.8.1-cp38-cp38-macosx_11_0_arm64.whl from here==>https://github.com/sun1638650145/Libraries-and-Extensions-for-TensorFlow-for-Apple-Silicon/releases
pip install /Downloads/tensorflow_text-2.8.1-cp38-cp38-macosx_11_0_arm64.whl
Able to execute the tutorial locally and produce comparable results. HTH