Python3.11 arm64 wheels for tensorflow-macos
Quick question, why is there a separate `tensorflow-macos` package? Would it be possible to add ARM64 macOS wheels for the main `tensorflow` package (since it already contains x86 macOS wheels anyway)? @cbrnr I know there is `tensorflow-metal` GPU acceleration that is ARM64 macOS specific. I'm not sure if that has anything to do with having a separate `tensorflow-macos` package. > @cbrnr I know there is `tensorflow-metal` GPU acceleration that is ARM64 macOS specific. I'm not sure if that has anything to do with having a separate `tensorflow-macos` package.

I think both `tensorflow-metal` and `tensorflow-macos` are created and maintained by Apple folks. Hi @jc-louis ,

Yes, `tensorflow-macos` and `tensorflow-metal` were developed and maintained by Apple. `pip install tensorflow-macos` installs the Apple package and `pip install tensorflow `installs Tensorflow package.

Recently I observed that pip install tf-nightly installing Arm wheels on Mac and its collecting tf-nightly-macos. There seems some improvements here for which I need more context on this and will confirm.

```
Using cached tf_nightly-2.13.0.dev20230417-cp310-cp310-macosx_12_0_arm64.whl (2.1 kB)
Collecting tf-nightly-macos==2.13.0-dev20230417
```
Can you try `pip install tf-nightly` on Mac and check whether arm wheel is installing or not. You can give it a try and let us know if any problems.Though I can't officially confirm any thing on this for now.I will let you know about this once I got more context.


Thanks! Here's the output for `pip install tf-nightly`:

<details>

```
Collecting tf-nightly
  Downloading tf_nightly-2.13.0.dev20230417-cp310-cp310-macosx_12_0_arm64.whl (2.1 kB)
Collecting tf-nightly-macos==2.13.0-dev20230417 (from tf-nightly)
  Downloading tf_nightly_macos-2.13.0.dev20230417-cp310-cp310-macosx_12_0_arm64.whl (188.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 188.2/188.2 MB 4.4 MB/s eta 0:00:00
Collecting absl-py>=1.0.0 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading absl_py-1.4.0-py3-none-any.whl (126 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.5/126.5 kB 18.9 MB/s eta 0:00:00
Collecting astunparse>=1.6.0 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting flatbuffers>=23.1.21 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading flatbuffers-23.3.3-py2.py3-none-any.whl (26 kB)
Collecting gast<=0.4.0,>=0.2.1 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading gast-0.4.0-py3-none-any.whl (9.8 kB)
Collecting google-pasta>=0.1.1 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading google_pasta-0.2.0-py3-none-any.whl (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.5/57.5 kB 8.4 MB/s eta 0:00:00
Collecting h5py>=2.9.0 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading h5py-3.8.0-cp310-cp310-macosx_11_0_arm64.whl (2.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.6/2.6 MB 11.9 MB/s eta 0:00:00
Collecting libclang>=13.0.0 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading libclang-16.0.0-py2.py3-none-macosx_11_0_arm64.whl (24.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 24.3/24.3 MB 31.3 MB/s eta 0:00:00
Collecting numpy<1.24,>=1.22 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading numpy-1.23.5-cp310-cp310-macosx_11_0_arm64.whl (13.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.4/13.4 MB 102.6 MB/s eta 0:00:00
Collecting opt-einsum>=2.3.2 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading opt_einsum-3.3.0-py3-none-any.whl (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 kB 12.7 MB/s eta 0:00:00
Collecting packaging (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading protobuf-4.22.3-cp37-abi3-macosx_10_9_universal2.whl (397 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 397.2/397.2 kB 52.5 MB/s eta 0:00:00
Requirement already satisfied: setuptools in ./.direnv/python-3.10.10/lib/python3.10/site-packages (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly) (67.6.1)
Collecting six>=1.12.0 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting termcolor>=1.1.0 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading termcolor-2.2.0-py3-none-any.whl (6.6 kB)
Collecting typing-extensions>=3.6.6 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting wrapt<1.15,>=1.11.0 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading wrapt-1.14.1-cp310-cp310-macosx_11_0_arm64.whl (35 kB)
Collecting grpcio<2.0,>=1.24.3 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading grpcio-1.53.0-cp310-cp310-macosx_12_0_universal2.whl (8.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.4/8.4 MB 98.2 MB/s eta 0:00:00
Collecting tensorboard<2.13,>=2.12 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading tensorboard-2.12.2-py3-none-any.whl (5.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.6/5.6 MB 101.9 MB/s eta 0:00:00
Collecting tensorflow-estimator<2.13,>=2.12.0rc0 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading tensorflow_estimator-2.12.0-py2.py3-none-any.whl (440 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 440.7/440.7 kB 55.0 MB/s eta 0:00:00
Collecting keras<2.13,>=2.12.0rc0 (from tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading keras-2.12.0-py2.py3-none-any.whl (1.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 90.3 MB/s eta 0:00:00
Collecting wheel<1.0,>=0.23.0 (from astunparse>=1.6.0->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Using cached wheel-0.40.0-py3-none-any.whl (64 kB)
Collecting google-auth<3,>=1.6.3 (from tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading google_auth-2.17.3-py2.py3-none-any.whl (178 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 178.2/178.2 kB 35.1 MB/s eta 0:00:00
Collecting google-auth-oauthlib<1.1,>=0.5 (from tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading google_auth_oauthlib-1.0.0-py2.py3-none-any.whl (18 kB)
Collecting markdown>=2.6.8 (from tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading Markdown-3.4.3-py3-none-any.whl (93 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.9/93.9 kB 12.3 MB/s eta 0:00:00
Collecting requests<3,>=2.21.0 (from tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Collecting tensorboard-data-server<0.8.0,>=0.7.0 (from tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading tensorboard_data_server-0.7.0-py3-none-any.whl (2.4 kB)
Collecting tensorboard-plugin-wit>=1.6.0 (from tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading tensorboard_plugin_wit-1.8.1-py3-none-any.whl (781 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 781.3/781.3 kB 63.5 MB/s eta 0:00:00
Collecting werkzeug>=1.0.1 (from tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading Werkzeug-2.2.3-py3-none-any.whl (233 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 233.6/233.6 kB 35.7 MB/s eta 0:00:00
Collecting cachetools<6.0,>=2.0.0 (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading cachetools-5.3.0-py3-none-any.whl (9.3 kB)
Collecting pyasn1-modules>=0.2.1 (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 kB 26.7 MB/s eta 0:00:00
Collecting rsa<5,>=3.1.4 (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading rsa-4.9-py3-none-any.whl (34 kB)
Collecting requests-oauthlib>=0.7.0 (from google-auth-oauthlib<1.1,>=0.5->tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting charset-normalizer<4,>=2 (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Using cached charset_normalizer-3.1.0-cp310-cp310-macosx_11_0_arm64.whl (123 kB)
Collecting idna<4,>=2.5 (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1 (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Using cached urllib3-1.26.15-py2.py3-none-any.whl (140 kB)
Collecting certifi>=2017.4.17 (from requests<3,>=2.21.0->tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting MarkupSafe>=2.1.1 (from werkzeug>=1.0.1->tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Using cached MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl (17 kB)
Collecting pyasn1<0.5.0,>=0.4.6 (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.1/77.1 kB 12.0 MB/s eta 0:00:00
Collecting oauthlib>=3.0.0 (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard<2.13,>=2.12->tf-nightly-macos==2.13.0-dev20230417->tf-nightly)
  Downloading oauthlib-3.2.2-py3-none-any.whl (151 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.7/151.7 kB 22.9 MB/s eta 0:00:00
Installing collected packages: tensorboard-plugin-wit, pyasn1, libclang, flatbuffers, wrapt, wheel, urllib3, typing-extensions, termcolor, tensorflow-estimator, tensorboard-data-server, six, rsa, pyasn1-modules, protobuf, packaging, oauthlib, numpy, MarkupSafe, markdown, keras, idna, grpcio, gast, charset-normalizer, certifi, cachetools, absl-py, werkzeug, requests, opt-einsum, h5py, google-pasta, google-auth, astunparse, requests-oauthlib, google-auth-oauthlib, tensorboard, tf-nightly-macos, tf-nightly
Successfully installed MarkupSafe-2.1.2 absl-py-1.4.0 astunparse-1.6.3 cachetools-5.3.0 certifi-2022.12.7 charset-normalizer-3.1.0 flatbuffers-23.3.3 gast-0.4.0 google-auth-2.17.3 google-auth-oauthlib-1.0.0 google-pasta-0.2.0 grpcio-1.53.0 h5py-3.8.0 idna-3.4 keras-2.12.0 libclang-16.0.0 markdown-3.4.3 numpy-1.23.5 oauthlib-3.2.2 opt-einsum-3.3.0 packaging-23.1 protobuf-4.22.3 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-2.28.2 requests-oauthlib-1.3.1 rsa-4.9 six-1.16.0 tensorboard-2.12.2 tensorboard-data-server-0.7.0 tensorboard-plugin-wit-1.8.1 tensorflow-estimator-2.12.0 termcolor-2.2.0 tf-nightly-2.13.0.dev20230417 tf-nightly-macos-2.13.0.dev20230417 typing-extensions-4.5.0 urllib3-1.26.15 werkzeug-2.2.3 wheel-0.40.0 wrapt-1.14.1
```
</details>

Indeed, `pip show tf-nightly` says:

```
Name: tf-nightly
Version: 2.13.0.dev20230417
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /Users/clemens/Desktop/temp/.direnv/python-3.10.10/lib/python3.10/site-packages
Requires: tf-nightly-macos
Required-by: 
```
 Hi @jc-louis ,

Please refer the below change in [setup.py](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/pip_package/setup.py) from TF master branch.

https://github.com/tensorflow/tensorflow/blob/3ace0c0eb8ef5856acc7a0fe6396b696ff800262/tensorflow/tools/pip_package/setup.py#L155-L159

This refers that the command `pip install tf-nightly` on mac-os with Darwin system and Arm64 Architecture (i.e Apple silicon) installs the package built by Apple.


 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. Please don't close, it would be nice to get a comment by Apple(?) folks about when Python 3.11 support will be added to `tensorflow-macos`. Would it be possible to update the 2.12 package? Or do we have to wait for 2.13? According to the [developer forum](https://developer.apple.com/forums/thread/728962), they're working on providing wheels for 2.12 Python 3.11 arm64 wheels available for tf-nightly(2.13.0.Dev...) as per above [comment](https://github.com/tensorflow/tensorflow/issues/60209#issuecomment-1533310854) and same can be downloaded on Apple silicon also.Not sure whether Apple has plan to release Python 3.11 arm64 wheels for TF2.12 also.If they release then the same changes can be implemented in TF repo also for 2.12 Version. However the final decision here shall be taken from TF dev team. I just tested it and it looks like `pip install tensorflow` on an M1 machine will now install `tensorflow==2.13.0rc0` successfully. Python 3.11 wheels for `tensorflow-macos` are now available on PyPI (for both x86_64 and arm64), so I think this issue can be closed. > Python 3.11 wheels for `tensorflow-macos` are now available on PyPI (for both x86_64 and arm64), so I think this issue can be closed.

But there are no 3.11 wheels for the latest stable version, just for an rc version. That's problematic. Which latest stable version do you mean? There are wheels for 2.12 now: https://pypi.org/project/tensorflow-macos/#files > Which latest stable version do you mean? There are wheels for 2.12 now: https://pypi.org/project/tensorflow-macos/#files

Yes, I just saw it was uploaded a couple of hours ago, sorry. I thought you were referring to the rc0 version. Closing the issue as it seems resolved now. Please feel free to reopen if still an issue. Thanks! 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/60209">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/60209">No</a>

### Current Behaviour?


For the package tensorflow 2.12 we have [precompiled wheels for python3.11](https://pypi.org/project/tensorflow/#files) but [not for the package tensorflow-macos](https://pypi.org/project/tensorflow-macos/#files). This means that we can use TF 2.12 + Python3.11 on macOS x86 (Intel mac) but not on arm64 (M1 mac)

-  ✔️  `TF 2.12 Python3.10 macOS arm64` (package [tensorflow-macos](https://pypi.org/project/tensorflow-macos/#files))
`tensorflow_macos-2.12.0-cp310-cp310-macosx_12_0_arm64.whl`
-  ✔️  `TF 2.12 Python3.11 macOS x86` (package [tensorflow](https://pypi.org/project/tensorflow/#files))
`tensorflow-2.12.0-cp311-cp311-macosx_10_15_x86_64.whl`
- ❌ `TF 2.12 Python3.11 macOS arm64` (package [tensorflow-macos](https://pypi.org/project/tensorflow-macos/#files))

### Standalone code to reproduce the issue

```shell
$ uname -m
arm64

$ python -V
Python 3.11.0

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