Error installing TensorFlow 2.6.0 in M1 Mac

Hello there, I am trying to install TensorFlow v2.6.0 in my M1 Macbook Pro using this command in a conda environment:
python -m pip install tensorflow-macos==2.6.0
But it gives me an error. Here’s the output:

    raise TypeError("str expected, not %s" % type(value).__name__)
            TypeError: str expected, not int
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: legacy-install-failure
      
      × Encountered error while trying to install package.
      ╰─> numpy
      
      note: This is an issue with the package mentioned above, not pip.
      hint: See above for output from the failure.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

The whole output is too big to fit in here. So I put the full output here - Error - Google Docs

Python v3.8.13
Pip v22.1.2
OS: macOS Big Sur Version 11.6

Please help me run TensorFlow in my M1 Mac. I gotta train a model for my robot. I have been trying so hard for last few days. :frowning:

Hi @Arannya,

Welcome to the TensorFlow Forum!

Which document are you following to install Tensorflow in your system? Could you please follow the step by step instructions mentioned in this TF install official link for installing Tensorflow in your system?

Let us know if the issue still persists. Thank you.