-
Notifications
You must be signed in to change notification settings - Fork 281
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
Can not build tensorflow-io
from source on Apple M1
#1643
Comments
First, goto to the Second, do:
Third, on the same bash shell do:
Fourth,
What I know currently is that Bazel build is not supported for mac m1 (for tensorflow/io). |
@ZaibanAli Thank you very much for your help, but still there is no dynamic library error. |
@sun1638650145 Okay so I tested it again and I am getting this error too when importing tensorflow_io or when using object detection api.
|
The tensorflow-io will need to have .so file complied from C++ code in order for file system plugins to work. But in order to compile C++ code it will need to have tensorflow installed. @ZaibanAli @sun1638650145 Which tensorflow package are you using on M1? |
@yongtang I am using this https://github.com/apple/tensorflow_macos/releases/tag/v0.1alpha3 All other things are working correctly, the issues only occurs when I try to use tensorlfow-io. (in my case it is required by tensorflow object detection api) |
@yongtang I'm using the stable version of tensorflow_macos. |
Update: I am able to run object detection api even with this warning, the problem was that I had previously installed the old TensorFlow addon package. Updating the TensorFlow addon package to the newest resolved the issue. |
@ZaibanAli @sun1638650145 My recent M1 laptop is having a firmware issue and is with apple repair now. I may only be able to take a look at building tensorflow-io after the laptop is back. Before the firmware issue I was using pip to install tensorflow_macos though I remember I had an issue with hdf5 dependency. Do you encounter the same hdf5 dependencies? |
@yongtang no dependency issues on my side. |
@yongtang |
trying the steps suggested to compile fails, using (base) io git:(master) ✗
➜ pip install --no-dependencies dist/tensorflow_io_gcs_filesystem-0.24.0-cp39-cp39-macosx_12_2_arm64.whl
ERROR: tensorflow_io_gcs_filesystem-0.24.0-cp39-cp39-macosx_12_2_arm64.whl is not a supported wheel on this platform.
(base) io git:(master) ✗
➜ pip install --no-dependencies dist/tensorflow_io-0.24.0-cp39-cp39-macosx_12_2_arm64.whl
ERROR: tensorflow_io-0.24.0-cp39-cp39-macosx_12_2_arm64.whl is not a supported wheel on this platform. |
@dvaldivia I had the same issue with The reason I found out was that TensorFlow .whl files are available for cp38 only for macos (tensorflow_macos/v0.1alpha3). |
I am able to get my M1 laptop back. However, while I successfully installed tensorflow_macos, during the bazel build the following issues popping up:
It looks like there is still some compatibility issue from bazel, either due to bazel itself, or due to some third party libraries (e.g., tensorflow)'s bazel BUILD. Will have to dig further. |
@yongtang I also had type problems when building with bazel, but now bazel has native support for M1, and can build |
The only difference I can see, is that I haven't installed XCode (only use command line tools). I can try install xcode. |
@yongtang Any update yet? I'm running into this issue as well. It does not let me use What would be a workaround you recommend? |
Hello, I'm also facing the same issue while importing tensorflow-io 0.27.0. What exactly needs to be done to resolve these warnings? |
I'm receiving the same warnings
Tried using an arm64 tensorflow_addons wheel as provided by @sun1638650145, but the warnings persist. still, I am able to run objecte detection jobs (https://www.tensorflow.org/hub/tutorials/tf2_object_detection). |
I'm seeing the same error you're seeing @guites. This is happening inside a docker container (dev container) on an M1 mac.
|
Just wanted to chime in that I am also having these issues but on the base tensorflow. Seems to run fine, checking |
I built |
Hi, any update on this issue, getting same error. |
the same error... |
I'm trying to make it fully work for three days, but still have those errors. |
Looking at many questions on stackoverflow, with 5k view, 3 answers, and 6 up votes on the best answer, make me convinced that it just doesn't work for the major of devs trying. |
Hi @sun1638650145 and @TiagoGouvea , can you please paste the build error ? |
I'm getting this message on every run, and it takes some like 5 seconds. After that the script follows.
Using a conda environment, this is my build and install results:
Thank you for your attention @kulinseth |
Now, |
Any chance we can re-open this until a MR is made to fix this for anyone who has a MacBook after 2020...? I really don't want to have to add anymore new |
@flippinroo2 |
WOW! Thanks so much dude. This helps A LOT! |
First I tried using
python setup.py bdist_wheel
, which buildswheel
, but the installation prompts meERROR: Could not find a version that satisfies the requirement tensorflow-io-gcs-filesystem==0.24.0 (from tensorflow-io) (from versions: none) ERROR: No matching distribution found for tensorflow-io-gcs-filesystem==0.24.0
So I changed it to install
pip install dist/tensorflow_io-0.24.0-cp38-cp38-macosx_11_0_arm64.whl --no-deps
without dependencies, so although it can be installed normally, it will prompt me that there is no dynamic library when runningAfter the above method fails, I refer to the build method in the documentation, unfortunately, run this command
bazel build -s --verbose_failures $BAZEL_OPTIMIZATION //tensorflow_io/... //tensorflow_io_gcs_filesystem/...
will produce the following error:So, what should I do?
The text was updated successfully, but these errors were encountered: