pip install tensorflow for Mac M1 Python3.11 matching distribution not found - nightly build does
If you are encountering the error "matching distribution not found" while trying to install TensorFlow on a Mac M1 with Python 3.11, it might be because TensorFlow does not have an official release that supports Python 3.11 yet. 

One option is to use a nightly build of TensorFlow, which may have support for Python 3.11. To install a nightly build of TensorFlow, you can use the following command in your terminal:

`pip install tf-nightly
`
This will install the latest nightly build of TensorFlow, which may contain support for Python 3.11. However, keep in mind that nightly builds are not guaranteed to be stable and may contain bugs.

Alternatively, you could try installing an earlier version of Python, such as Python 3.9, and then install TensorFlow using pip. To do this, you can use the following commands in your terminal:


```
brew install pyenv
pyenv install 3.9.10
pyenv global 3.9.10
pip install tensorflow

```
This will install Python 3.9.10 using pyenv, set it as the global Python version, and then install TensorFlow using pip.






 I have the same problem. `tf-nightly` indeed works but not `tensorflow`. I've tried with python 3.9.10 (exactly the instructions above) and the 3.8, 3.10 and 3.11 that `pyenv` currently install. It won't find `tensorflow`, `tensorflow-macos` or `tensorflow-deps` or `tensorflow-metal` that I've seen in other tutorials. Upgrade pip, use venv, only install necessary package `pip install TensorFlow` or
do `pip install --upgrade --force-reinstall TensorFlow`    or 
Try installing TensorFlow from source instead of using pip. To do this, you can follow the instructions on the TensorFlow website: https://www.tensorflow.org/install/source.
 Thank you! I managed to install TensorFlow after following the instructions from Apple (https://developer.apple.com/metal/tensorflow-plugin/) which only worked after downgrading to Python 3.10, but then I got stuck on installing `tensorflow-text`. I guess I can install that from source, too, but I gave up on working with my m1 for now. Thanks again! @alexlatif,
Have you got the chance to have a look at this https://github.com/tensorflow/tensorflow/issues/60209 issue which is requesting for a similar feature and the issue is still open. Also please take a look at this issue from the Apple discussion forum for the reference
https://developer.apple.com/forums/thread/691403?answerId=750196022#750196022

Thank you! I have an Apple with M1 chip and I can't install tensorflow either.

```
➜  python -m venv env
➜  source env/bin/activate

(env) ➜  python --version
Python 3.9.12

(env) ➜  pip --version         
pip 23.0.1 from /Users/dcavazos/src/sandbox/env/lib/python3.9/site-packages/pip (python 3.9)

(env) ➜  pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
```

It seems that `tf-nightly` works, but it would be nice to be able to install plain old `tensorflow`. @davidcavazos,
Both tensorflow-macos and tensorflow-metal were developed & maintained by Apple. 
**pip install tensorflow-macos** installs the Apple package and **pip install tensorflow** installs Tensorflow package.
Also please have a look at this [comment](https://github.com/tensorflow/tensorflow/issues/60209#issuecomment-1512424619) from the developer for the reference. Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. I recommend maintaining the issue open until closed.
Apparently there is a related discussion on a different thread.

[[Python3.11 arm64 wheels for tensorflow-macos](https://github.com/tensorflow/tensorflow/issues/60209#top)](https://github.com/tensorflow/tensorflow/issues/60209#issuecomment-1512424619) Not stale.

Tensorflow docs state _Tensorflow is tested on Python 3.8–3.11_. That is patently false.

```
$ python3 -m pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

$ python3 -V
Python 3.10.11

$ sw_vers
ProductName:		macOS
ProductVersion:		13.3.1
BuildVersion:		22E261

$ uname -a
Darwin US-TDWYF57V1F 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64

$ python3 -m pip --version
pip 23.1.2
``` I just tested it and it looks like `pip install tensorflow` on an M1 machine will now install `tensorflow==2.13.0rc0` successfully. I have a similar issue of pip not finding any version beside 2.13.x on a Mac M1.

```
(delft_p38) Lucas-M1-MBP:delft lfoppiano$ pip install --upgrade pip 
Requirement already satisfied: pip in /Users/lfoppiano/anaconda3/envs/delft_p38/lib/python3.8/site-packages (23.1.2)
(delft_p38) Lucas-M1-MBP:delft lfoppiano$ python --version
Python 3.8.17
(delft_p38) Lucas-M1-MBP:delft lfoppiano$ pip install tensorflow==2.9.3
ERROR: Could not find a version that satisfies the requirement tensorflow==2.9.3 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0)
ERROR: No matching distribution found for tensorflow==2.9.3
(delft_p38) Lucas-M1-MBP:delft lfoppiano$ 
``` Hello,
Starting from TF2.13v tensorflow team changed the setup.py file to allow users to install the tensorflow package based on the platform they are trying to install.

From Tf2.13v onwards:

https://github.com/tensorflow/tensorflow/blob/f841394b1b714c5cc5366536411cf146c8c570df/tensorflow/tools/pip_package/setup.py#L140-L157


For TF2.12v:
https://github.com/tensorflow/tensorflow/blob/8e2b6655c0c488290179ab90a0daed0f6d3006f7/tensorflow/tools/pip_package/setup.py#L143-L156


You can find that in TF2.12v `tensorflow-macos` was not added under collaborate build. Users has to install `tensorflow-macos` explicitly on Mac M1/M2(Apple chip).

However from Tf2.13 tensorflow team added `tensorflow-macos` under collaborate build hence you can able to install it using `pip install tensorflow` itself. 

Please note that the package being installed on Mac M1/M2 (Apple chip) is still Apple's Package only even though you are using `pip install tensorflow`. 
 @alexlatif ,

I hope the above explanation clears your queries. Please let us know whether we are good to close the issue now.

Thanks! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60256">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60256">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

2.12

### Custom Code

No

### OS Platform and Distribution

Mac OSX M2

### Mobile device

_No response_

### Python version

3.11

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

```shell
please could you support mac M1's in a way where we dont have to build from source

tf-nightly is working out of the box but standard pip tensorflow is currently not supported
```


### Standalone code to reproduce the issue

```shell
pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

pip install tensorflow-macos
ERROR: Could not find a version that satisfies the requirement tensorflow-macos (from versions: none)
ERROR: No matching distribution found for tensorflow-macos

pip install tf-nightly 
Downloading tf_nightly-2.13.0.dev20230406-cp311-cp311-macosx_12_0_arm64.whl (2.1 kB)
```


### Relevant log output

_No response_</details>