Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64 support for M1 #1298

Open
pietmlr opened this issue Feb 3, 2021 · 35 comments
Open

arm64 support for M1 #1298

pietmlr opened this issue Feb 3, 2021 · 35 comments
Labels
enhancement Enhancement request feature New feature request

Comments

@pietmlr
Copy link

pietmlr commented Feb 3, 2021

Dear TensorFlow-io team and community,
are there any plans for adding support for arm64 machines? I use a M1 mac and I'm not able to install the wheel. Anyone who's reading this, do you know any alternatives that I can use? My goal is to create a mel-spectogram from a .wav file. ps: M1 cannot use Scipy at this time.

@yongtang yongtang added enhancement Enhancement request feature New feature request labels Feb 3, 2021
@yongtang
Copy link
Member

yongtang commented Feb 3, 2021

@redmlr In order to get M1 support I think we needs

  1. The M1 version of the tensorflow package (TensorFlow support for Apple Silicon (M1 Chips) tensorflow#44751 provides a way to build tensorflow on M1, though no release package)
  2. A M1 build machine (ideally with GitHub Actions) (Add ARM + MacOS target to be able to use on self-hosted runners actions/runner#805)

I don't have access to M1 laptop yet, may take a look after I get one.

@pietmlr
Copy link
Author

pietmlr commented Feb 4, 2021

@yongtang Thank you for answering,
There’s a m1 accelerated version of tensorflow in apples tensorflow repo, which is in alpha version. I’m running the latest version of this and it runs fine but tensorflow-io is a separate library which won’t install.

@yongtang
Copy link
Member

yongtang commented Feb 4, 2021

@redmlr The tensorflow-io package will need to be re-compiled for all functionalities to work. Though if you are only looking for functions that does not requires C++ code (only need python code) then it should be possible to just package the source tree.

Which function (or list of functions) you intend to use?

@pietmlr
Copy link
Author

pietmlr commented Feb 5, 2021

@yongtang I'm planning to use the following:

tfio.experimental.audio.trim tfio.experimental.audio.spectrogram tfio.experimental.audio.melscale tfio.experimental.audio.dbscale tfio.experimental.audio.freq_mask tfio.experimental.audio.time_mask

@pietmlr
Copy link
Author

pietmlr commented Feb 6, 2021

Thank you @yongtang !
I'm using not that long.. What does just package the source tree mean and how do I do this? I already downloaded the latest release of io and changed the desired file (init.py) as mentioned in #1302

@yongtang
Copy link
Member

yongtang commented Feb 6, 2021

@redmlr With PR #1302 in you can build the wheel with:

python3 setup.py -q bdist_wheel

The wheel file will be located under dist directory.

You can then install the wheel with:

python3 -m pip install --no-deps <wheel-file-build-from-last-step>

That will at least allows you to use python only functions in tensorflow-io.

Note --no-deps will ignore the dependency of tensorflow package (as the official tensorflow package is different from the apple's tensorflow package).

Note normally the wheel file needs to pass --data bazel-bin

python3 setup.py --data bazel-bin -q bdist_wheel

where --data bazel-bin indicates the location of the complied C++ kernels. However, it is not yet possible to build C++ kernels on M1 so you can skip this part.

Note also the wheel package built from the above will not have file systems support (e.g, azure/etc) as well (file system support also requires compiled C++ kernels).

@TylerADavis
Copy link

TylerADavis commented Nov 1, 2021

Are there any updates on this front? I am interested in doing some development on TensorFlow itself, and I'm unable to install my tf-nightly wheel as there's no compatible version of tensorflow-io-gcs on pypi for arm64 macOS. I'll try setting up the io wheel from source, but being able to install straight from pypi would be great. If there's anything I can do on my end to help get this released, I'd be glad to help.

System Setup:
Python 3.9
macOS 12
Apple M1 Pro processor

Steps Taken:

The below steps are how I am building TensorFlow itself, all taken from the official documentation. This stage works without issue.

$ python3.9 -m venv ./tensorflow_39_compile
$ source compile_tensorflow_39/bin/activate
$ pip install -U pip numpy wheel
$ pip install -U keras_preprocessing --no-deps
$ git clone https://github.com/tensorflow/tensorflow.git
$ cd tensorflow
$ ./configure
$ bazel build  //tensorflow/tools/pip_package:build_pip_package
$ ./bazel-bin/tensorflow/tools/pip_package/build_pip_package --nightly_flag /tmp/tensorflow_pkg

Now I try to install the wheel I made, and it fails

$ cd /tmp/tensorflow_pkg
$ pip3 install -v tf_nightly-2.8.0-cp39-cp39-macosx_12_0_arm64.whl
Using pip 21.3.1 from /Users/tylerdavis/tensorflow_39_compile/lib/python3.9/site-packages/pip (python 3.9)
Processing ./tf_nightly-2.8.0-cp39-cp39-macosx_12_0_arm64.whl
Collecting keras-nightly~=2.8.0.dev
  Using cached keras_nightly-2.8.0.dev2021110107-py2.py3-none-any.whl (1.4 MB)
Collecting gast<0.5.0,>=0.2.1
  Using cached gast-0.4.0-py3-none-any.whl (9.8 kB)
Collecting astunparse>=1.6.0
  Downloading astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
ERROR: Could not find a version that satisfies the requirement tensorflow-io-gcs-filesystem>=0.21.0 (from tf-nightly) (from versions: none)
ERROR: No matching distribution found for tensorflow-io-gcs-filesystem>=0.21.0

@TylerADavis
Copy link

I can confirm that the below let me install my copy of tensorflow built from HEAD:

# From root of io project
$ python3 setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem          
$ cd dist
$ pip3 install tensorflow_io_gcs_filesystem-0.21.0-cp39-cp39-macosx_12_0_arm64.whl
$ cd /tmp/tensorflow_pkg
# Install h5py following the instructions in https://github.com/h5py/h5py/issues/1982
# as pip install h5py is currently broken on arm64 macs
$ pip3 install ./tf_nightly-2.8.0-cp39-cp39-macosx_12_0_arm64.whl

@matteosantama
Copy link

I too am looking to install tensorflow-io-gcs-filesystem directly from PyPI.

MacOS Monterey 12.0 Apple M1 Pro

It looks like @TylerADavis has the right commands to produce the wheel. How can we publish it to PyPI?

@admackin
Copy link

admackin commented Nov 22, 2021

@matteosantama I think to make the above work out-of-the-box, it would need Github Actions to support ARM runners which is not yet on the roadmap. Also see actions/runner#805

Cross-compilation could work in theory I guess, but the above commands aren't for cross-compiling, and I imagine it will be a little more fiddly to get it going.

@yingshaoxo
Copy link

No, it can't be built

(pornstar) yingshaoxo@macos io % python3 setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem 
Project: tensorflow-io-gcs-filesystem
Exclude: ['tests', 'tests.*', 'tensorflow_io', 'tensorflow_io.*']
Install Requires: []
Project Rootpath: tensorflow_io_gcs_filesystem
/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Traceback (most recent call last):
  File "setup.py", line 138, in <module>
    setuptools.setup(
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
    return distutils.core.setup(**attrs)
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
    return run_commands(dist)
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
    dist.run_commands()
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
    self.run_command(cmd)
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 328, in run
    impl_tag, abi_tag, plat_tag = self.get_tag()
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
    assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp38', 'cp38', 'macosx_11_0_arm64')

@albirrkarim
Copy link

No, it can't be built

(pornstar) yingshaoxo@macos io % python3 setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem 
Project: tensorflow-io-gcs-filesystem
Exclude: ['tests', 'tests.*', 'tensorflow_io', 'tensorflow_io.*']
Install Requires: []
Project Rootpath: tensorflow_io_gcs_filesystem
/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Traceback (most recent call last):
  File "setup.py", line 138, in <module>
    setuptools.setup(
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
    return distutils.core.setup(**attrs)
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
    return run_commands(dist)
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
    dist.run_commands()
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
    self.run_command(cmd)
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 328, in run
    impl_tag, abi_tag, plat_tag = self.get_tag()
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
    assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp38', 'cp38', 'macosx_11_0_arm64')

i got same result

@TeoZosa
Copy link

TeoZosa commented Jan 24, 2022

No, it can't be built

i got same result

What do you guys get when you run the below?

xcrun --show-sdk-path && \
xcrun --show-sdk-version && \
sw_vers -productVersion

Ex. on my machine:

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
12.1
12.1

For some of my builds I had to export MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion)" prior to building, but IIRC I didn't actually have to do that for TF IO...

@jgmartin
Copy link

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
12.1
12.1

same output running the above commands

@TeoZosa
Copy link

TeoZosa commented Jan 25, 2022

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
12.1
12.1

same output running the above commands

Hmmm. so still AssertionError: would build wheel with unsupported tag ('cp38', 'cp38', 'macosx_11_0_arm64')?

Is it still the same when running the below?

export MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion)"
python3 setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem 

@albirrkarim
Copy link

xcrun --show-sdk-path && \
xcrun --show-sdk-version && \
sw_vers -productVersion

image

@TylerADavis
Copy link

I just built again without issue by doing the following from HEAD today

❯ python3.9 -m venv ~/io_v2
❯ source ~/io_v2/bin/activate
❯ pip3 install --upgrade pip
Requirement already satisfied: pip in /Users/tylerdavis/io_v2/lib/python3.9/site-packages (21.2.3)
Collecting pip
  Downloading pip-22.0.3-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 2.0 MB/s 
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.3
    Uninstalling pip-21.2.3:
      Successfully uninstalled pip-21.2.3
Successfully installed pip-22.0.3
❯ pip install wheel
Collecting wheel
  Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.37.1
❯ python3 setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem
Project: tensorflow-io-gcs-filesystem
Exclude: ['tests', 'tests.*', 'tensorflow_io', 'tensorflow_io.*']
Install Requires: []
Project Rootpath: tensorflow_io_gcs_filesystem
❯ cd dist
❯ pip3 install tensorflow_io_gcs_filesystem-0.21.0-cp39-cp39-macosx_12_0_arm64.whl
Processing ./tensorflow_io_gcs_filesystem-0.21.0-cp39-cp39-macosx_12_0_arm64.whl
Installing collected packages: tensorflow-io-gcs-filesystem
Successfully installed tensorflow-io-gcs-filesystem-0.21.0
❯ xcrun --show-sdk-path && \
xcrun --show-sdk-version && \
sw_vers -productVersion
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
objc[36632]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x1ef46f678) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1078682c8). One of the two will be used. Which one is undefined.
objc[36632]: Class AMSupportURLSession is implemented in both /usr/lib/libamsupport.dylib (0x1ef46f6c8) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x107868318). One of the two will be used. Which one is undefined.
12.1
12.2

@Ekhao
Copy link

Ekhao commented Feb 11, 2022

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
12.1
12.1

same output running the above commands

Hmmm. so still AssertionError: would build wheel with unsupported tag ('cp38', 'cp38', 'macosx_11_0_arm64')?

Is it still the same when running the below?

export MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion)"
python3 setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem 

Hello,

I am having a similar issue installing tensorflow-io on my M1 macbook. Initially I was failing to build the wheel file just as the other two examples in this thread, however, using the commands that you suggested here I was able to do just that.

Unfortunately the installation now fails at when running:
python3 -m pip install --no-deps <wheel-file-build-from-last-step>
Which gives me the following error:
ERROR: tensorflow_io-0.24.0-cp38-cp38-macosx_10_14_arm64.whl is not a supported wheel on this platform.

@tyama711
Copy link

I faced the same issue as Ekhao, but when I upgraded to Python 3.9 and ran it, it worked.

@leochoo
Copy link

leochoo commented May 29, 2022

I was able to install tensorflow-io and tensorflow-io-gcs-filesystem but
it fails to import tensorflow_io....

@lminer
Copy link

lminer commented Jun 7, 2022

Anyone have a wheel they'd care to spare?

@lminer
Copy link

lminer commented Jul 8, 2022

tensorflow_io_gcs_filesystem works for me given the instructions above in both python 3.8 and 3.9. I can't get bazel to build tensorflow-io though on the m1, which I suppose shouldn't be surprising. This would be a great feature to have so that tfio based development would be possible on m1s.

@pshiko
Copy link
Contributor

pshiko commented Aug 6, 2022

tensorflow whl for aarch64 is now available on pypi.

https://pypi.org/project/tensorflow/2.10.0rc0/#files

I installed this tensorflow in a container on m1 mac and confirmed that tensorflow-io bazel can be built.

Buildings for AppleSilicon with MacOS are still failing due to many factors.
However, being able to develop using tensorflow-io on a container without x86 emulation feels like a big step forward!

FROM python:3.9-buster

WORKDIR /root

RUN apt-get update && apt-get install wget
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.12.0/bazelisk-linux-arm64 -O /usr/local/bin/bazelisk && \
    chmod +x /usr/local/bin/bazelisk

RUN git clone -b v0.26.0 https://github.com/tensorflow/io.git 
RUN python -m pip install tensorflow==2.10.0rc0
RUN cd io && bazelisk && python tools/build/configure.py
RUN cd io && bazelisk build //tensorflow_io/... //tensorflow_io_gcs_filesystem/...
RUN cd io && \
    python3 setup.py --data bazel-bin -q bdist_wheel --project tensorflow_io_gcs_filesystem && \
    python3 setup.py --data bazel-bin -q bdist_wheel && \
    python3 -m pip install dist/* --force-reinstall
RUN python3 -m pip install 

@NilsJPWerner
Copy link

NilsJPWerner commented Aug 9, 2022

@redmlr In order to get M1 support I think we needs

  1. The M1 version of the tensorflow package (TensorFlow support for Apple Silicon (M1 Chips) tensorflow#44751 provides a way to build tensorflow on M1, though no release package)
  2. A M1 build machine (ideally with GitHub Actions) (Add ARM + MacOS target to be able to use on self-hosted runners actions/runner#805)

I don't have access to M1 laptop yet, may take a look after I get one.

It looks like github actions has m1 build in GA now! https://github.blog/changelog/2022-08-09-github-actions-self-hosted-runners-now-support-apple-m1-hardware/

Would be great to get tf io to support mac m1 now that tensorflow supports it.

@pshiko
Copy link
Contributor

pshiko commented Aug 17, 2022

The torch project uses xcode's cross-compilation feature to build binaries for the Apple silicon version on an x86 mac.
https://github.com/pytorch/pytorch/blob/ea037344e81d5645ad2e8863a9b6ccdb33f60320/.jenkins/pytorch/macos-build.sh#L36-L39
(ref. https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary)

If we try this, it seems that we can build binary for apple silicon without preparing a self-hosted runner.

@muuvmuuv
Copy link

This worked for me on my iMac with the latest macOS release:

pip install wheel
cd tensorflow_io
python3 setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem
cd ../project
poetry add ../tensorflow_io/dist/xxxxxxx.whl

@gc250265
Copy link

@pshiko , I'm having issues with your Dockerfile. The last line is empty, so I removed it. Then it has lots of warnings while building, but it seems to work. When I run the container, the commands in the example on the readme of this project fail. This is the code in that example.

import tensorflow as tf
import tensorflow_io as tfio
# Read the MNIST data into the IODataset.
dataset_url = "https://storage.googleapis.com/cvdf-datasets/mnist/"
d_train = tfio.IODataset.from_mnist(
    dataset_url + "train-images-idx3-ubyte.gz",
    dataset_url + "train-labels-idx1-ubyte.gz",
)

And this is the error I get.

raise NotImplementedError(
NotImplementedError: unable to open file: libtensorflow_io.so, from paths: ['/usr/local/lib/python3.9/site-packages/tensorflow_io/python/ops/libtensorflow_io.so']
caused by: ['/usr/local/lib/python3.9/site-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZN10tensorflow13GcsFileSystem12ParseGcsPathEN4absl12lts_2021110211string_viewEbPSsS4_']

If you know where is the issue or if you could help me build a container that works, I would really appreciate it. I've been trying for a while, but I'm unable to run some projects that depend on TensorFlow on my m1 Mac.

@sdharar
Copy link

sdharar commented Nov 18, 2022

No, it can't be built

(pornstar) yingshaoxo@macos io % python3 setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem 
Project: tensorflow-io-gcs-filesystem
Exclude: ['tests', 'tests.*', 'tensorflow_io', 'tensorflow_io.*']
Install Requires: []
Project Rootpath: tensorflow_io_gcs_filesystem
/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Traceback (most recent call last):
  File "setup.py", line 138, in <module>
    setuptools.setup(
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/__init__.py", line 155, in setup
    return distutils.core.setup(**attrs)
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
    return run_commands(dist)
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
    dist.run_commands()
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
    self.run_command(cmd)
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 328, in run
    impl_tag, abi_tag, plat_tag = self.get_tag()
  File "/Users/yingshaoxo/miniforge3/envs/pornstar/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
    assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp38', 'cp38', 'macosx_11_0_arm64')

i got same result

After some further digging, I was able to get this working on my setup with MacOS Ventura 13.0.1 (M1 Max). You have to uninstall your existing wheel version. Use the bellow commands.

pip uninstall wheel

Select yes, after the prompt to uninstall. After this, you can install wheel from its official git repository while enabling flag --use-pep517.

pip install wheel@git+http://github.com/pypa/wheel --use-pep517

You can then use the steps shown on this thread (by @TylerADavis) to install tensorflow_io. I'm providing my console output below as a reference:

(tensorflow) ---@--- io % python setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem
Project: tensorflow-io-gcs-filesystem
Exclude: ['tests', 'tests.*', 'tensorflow_io', 'tensorflow_io.*']
Install Requires: []
Project Rootpath: tensorflow_io_gcs_filesystem
/Users/---/opt/miniconda3/envs/tensorflow/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
(tensorflow) ---@--- io % cd dist
(tensorflow) ---@--- dist % ls                                                                                                                                                  
tensorflow_io_gcs_filesystem-0.27.0-cp39-cp39-macosx_11_0_arm64.whl
(tensorflow) ---@--- dist % pip install tensorflow_io_gcs_filesystem-0.27.0-cp39-cp39-macosx_11_0_arm64.whl 
Processing ./tensorflow_io_gcs_filesystem-0.27.0-cp39-cp39-macosx_11_0_arm64.whl
Installing collected packages: tensorflow-io-gcs-filesystem
Successfully installed tensorflow-io-gcs-filesystem-0.27.0

Hopefully it should solve the issue. Cheers. ;)

@muuvmuuv
Copy link

My solution: devcontainer and VS Code. Work in Docker give it 90% of Respources and enjoy TF without the headache

@cmditch
Copy link

cmditch commented Dec 7, 2022

My solution: devcontainer and VS Code. Work in Docker give it 90% of Respources and enjoy TF without the headache

@muuvmuuv Can you share your dev container config? I'm running in a dev container on my M1 and still experiencing issues.

@muuvmuuv
Copy link

muuvmuuv commented Dec 8, 2022

Sure @cmditch, I have provided it as a Gist, so we can make adjustments for others :)

https://gist.github.com/muuvmuuv/cfd0eee59b9e7fd994e2ca45f09d4b83

@JunjianS
Copy link

I can confirm that the below let me install my copy of tensorflow built from HEAD:

# From root of io project
$ python3 setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem          
$ cd dist
$ pip3 install tensorflow_io_gcs_filesystem-0.21.0-cp39-cp39-macosx_12_0_arm64.whl
$ cd /tmp/tensorflow_pkg
# Install h5py following the instructions in https://github.com/h5py/h5py/issues/1982
# as pip install h5py is currently broken on arm64 macs
$ pip3 install ./tf_nightly-2.8.0-cp39-cp39-macosx_12_0_arm64.whl

Hello,
I am having a similar issue installing tensorflow-io on my M1 macbook.

xcrun --show-sdk-path && \
xcrun --show-sdk-version &&
sw_vers -productVersion
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
13.3
13.0

Project: tensorflow-io-gcs-filesystem
Exclude: ['tests', 'tests.', 'tensorflow_io', 'tensorflow_io.']
Install Requires: []
Project Rootpath: tensorflow_io_gcs_filesystem
/Users/tim/miniconda/envs/tensorflow/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(

@shubham-gupta-iitr
Copy link

This was just a warning for me. I was still able to get new dist folder with the .whl file in it.

@antmikinka
Copy link

antmikinka commented Oct 6, 2023

I was able to build on my 2020 M1 Macbook Pro.
pip install build ensuring it was installed

The exact command I was trying to do:
python setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem

New command to build:
python -m build --wheel --outdir dist/

Here is the reasoning:
However, the --project tensorflow_io_gcs_filesystem part of your old command is not a standard option for setup.py. The build tool does not have an equivalent for this specific option. If this is a custom option specific to a particular project, the build tool might not support it directly.

You might need to set up or modify a pyproject.toml file or other configuration to achieve the same effect as the --project option, depending on what that option does. It's essential to consult the documentation or maintainers of the specific project (tensorflow_io_gcs_filesystem in this case) to understand how to handle custom options with the new build tools.

@flippinroo2
Copy link

flippinroo2 commented Jan 8, 2024

Any update on getting this working? There's 3 versions of Apple M processors at this point.

Also, the specs on the M3 Max makes it look like one of the best machines for running this stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement request feature New feature request
Projects
None yet
Development

No branches or pull requests