io
io copied to clipboard
Cannot install Tensorflow.io on Mac M1
Hi Im trying to use Tensorflow.io while im learning object detection with this tutorial: https://www.youtube.com/watch?v=yqkISICHH-U&t=9352s and while im training my model I noticed an import of Tensorflow.io but I cannot install it. I try "pip install tenorflow.io" but I get error like: ERROR: Could not find a version that satisfies the requirement tensorflow.io (from versions: none) ERROR: No matching distribution found for tensorflow.io
I am having the same issue. Did you found something related to this?
you can install using pip install tensorflow-io
. However, please note that the following are different:
import tensorflow as tf
# use tf.io.gfile.listdir(...)
import tensorflow_io as tfio
# use tfio.IODataset.from_audio(...)
The tfio wheels are yet to be built and released for M1 macs though.
After running pip install tensorflow-io
I get this error:
ERROR: Could not find a version that satisfies the requirement tensorflow-io (from versions: none)
ERROR: No matching distribution found for tensorflow-io
@ZaibanAli Since GitHub actions don't support M1 mac based runner environments, we couldn't auto build and publish the tensorflow-io
wheels to PyPI for M1 devices. We are working on alternatives to add the support!
I tried to build io myself using python3 setup.py -q bdist_wheel
but it gave me this error.
Project: tensorflow-io
Exclude: ['tests', 'tests.*', 'tensorflow_io_gcs_filesystem', 'tensorflow_io_gcs_filesystem.*']
Install Requires: ['tensorflow-io-gcs-filesystem==0.24.0']
Project Rootpath: tensorflow_io
Traceback (most recent call last):
File "setup.py", line 138, in <module>
setuptools.setup(
File "/Users/zaiban.ali/miniforge3/envs/test0/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Users/zaiban.ali/miniforge3/envs/test0/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/zaiban.ali/miniforge3/envs/test0/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/zaiban.ali/miniforge3/envs/test0/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/zaiban.ali/miniforge3/envs/test0/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 328, in run
impl_tag, abi_tag, plat_tag = self.get_tag()
File "/Users/zaiban.ali/miniforge3/envs/test0/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')
Reference: https://github.com/tensorflow/io/issues/1298#issuecomment-774511436
I think a similar result was posted in https://github.com/tensorflow/io/issues/1298#issuecomment-1019636662. It would be great to continue the discussion over there as I currently don't have an M1 mac to try things out.
Hi @kvignesh1420 , I have same issue, I can't install tensorflow-io on Mac m1. Till now, I am only able to install tensorflow-macos and tensorflow-metal successfully. Do you have any update or clue on the issue ? Is it possible to build the tensorflow-io source code from my machine Mac m1 ? If yes which tensorflow-io version I have to take ?
Here the version of tensorflow-deps installed in my machine.
tensorboard 2.8.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorflow-macos 2.8.0 tensorflow-metal 0.3.0
We really appreciate your help. Many thanks.
same issues
same issue
Ive fix it somehow, i think using wheel help. and then i need to manually change in files downloaded from the tutorial: tensorflow.io to tensorflow-io. It works for me but i'm not sure how exactly i fix it 😄
@sconiac can you please tell us in more detail how you did it? I am stuck with this for more than 2 weeks.
I remove my old project, so I create new one by following this tutorial: https://developer.apple.com/metal/tensorflow-plugin/. Then I type:
$ git clone https://github.com/tensorflow/io.git
$ cd io
$ python3 setup.py -q bdist_wheel
Project: tensorflow-io Exclude: ['tests', 'tests.*', 'tensorflow_io_gcs_filesystem', 'tensorflow_io_gcs_filesystem.*'] Install Requires: ['tensorflow-io-gcs-filesystem==0.24.0'] Project Rootpath: tensorflow_io /Users/olivierskonieczny/miniforge3/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(
(There I get a warning but importing at the end work (also with some weird warnings :) ))
$ python3 -m pip install --no-deps dist/tensorflow_io-0.24.0-cp39-cp39-macosx_11_0_arm64.whl
And last I check if every thing works by:
$ python3
>>> import tensorflow_io as tfio
(its part that throw some error )
>>> print(tfio.__version__)
0.24.0
Hope all works,
@sconiac thank you for explaining what you did. I already reached this point but the part where it throws a dynamic library error is the critical one and it is required by Tensorflow object detection api.
Oh, sorry. I didn't notice that, but I'm afraid I don't know how to fix your issue. On my Mac every think works fine, even training my own model. I think you can try old fixing method just reinstall everything you can and that may help.
Seems like @sconiac steps only works for MacOS 11
not for macOS 12
(Monterey)
same issue
also got the same issue
Came here to say, same issue :-)
Same issue aswell
same issue as well
same issue : )
Same issue, macOS 12 specifically.
Same on Mac OS 12 Monterey, with this error:
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
Any news about compatibility with Apple Silicon please ?
Same issue (macosx12 m1):
AssertionError: would build wheel with unsupported tag ('cp39', 'cp39', 'macosx_11_0_arm64')
Same issue on M1 Pro
I recently updated my mac to OS 12.3.1 (M1), I am also facing same issue on installing tensorflow-io. kindly share any, if it can be fixed.
Same issue as well
I am also facing the same issue on MacOS 12.3.1, on an M1 Pro 2021 MacBook Pro!
Same problem here!
Putting this here in case anybody else runs into the same issue I had with using conda. I finally got this working by ignoring the instructions here. And doing the following:
cd
python3 -m venv .tensorflow
source ~/.tensorflow/bin/activate
brew install hdf5
export CPATH="/opt/homebrew/include/"
export HDF5_DIR=/opt/homebrew/
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal
git clone https://github.com/tensorflow/io.git
cd io
python setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem
pip install --no-deps dist/tensorflow_io_gcs_filesystem-0.25.0-cp39-cp39-macosx_12_0_arm64.whl
python setup.py -q bdist_wheel
pip install --no-deps dist/tensorflow_io-0.25.0-cp39-cp39-macosx_12_0_arm64.whl
There may be other system requirements that need to be installed through brew that I already had installed. YMMV.