tensorflow-macos cannot be installed on Python 3.8 virtual environment

I followed this guideline to install TensorFlow: https://developer.apple.com/metal/tensorflow-plugin/

and run example code on miniforge3 base environment, but importing the numpy C-extensions failed. because  * The Python version is: Python3.9 The NumPy version is: "1.19.5"

then I tried to create a new conda environment with python 3.8, and then tried to install tensorflow-macos, but it failed because of grpcio cannot be installed.

so in this case, how can I solve this problem?

Hello dkjdjdfdskln,

  1. What macOS version are you using? OS requirements for the latest TensorFlow-macos is macOS 12.0+
  2. Can you please provide a code sample that's failing?
  3. When you create a new conda environment, please make sure to specify the environment you are installing packages to conda install package -n my_env, please try these:
  • conda activate my_env
  • conda install -c apple tensorflow-deps -n my_env or conda install -c apple tensorflow-deps --force-reinstall -n my_env
  • python -m pip install tensorflow-macos or python -m pip install --upgrade --force-reinstall tensorflow-macos

Hi yuliya80,

Thank you for your help. Let me give more details:

  1. My macOS version is 12.0.1.
  2. the code sample is MINIST toy example, from tensorflow website: https://www.tensorflow.org/datasets/keras_example
  3. I tried it again and occurs same error. what I can feel is the tensorflow-macos is still unstable..... but thank you at least give me a direction otherwise I am totally freak out....
tensorflow-macos cannot be installed on Python 3.8 virtual environment
 
 
Q