How to compile and install tensorflow-2.8 from source for the aarch64/arm64, now that the version depends on "tensorflow-io"

Viewed 1040

I followed the compile guide found in https://www.tensorflow.org/install/source to compile tensorflow from source successfully on Oracle ARM Ampere instance and managed to generate the "whl" file("tensorflow-2.8.0-cp38-cp38-linux_aarch64.whl"). However, when i do "pip install tensorflow-2.8.0-cp38-cp38-linux_aarch64.whl" it reports that tensorflow-io is not available.

ERROR: Could not find a version that satisfies the requirement tensorflow-io-gcs-filesystem>=0.21.0 (from tensorflow==2.8.0) (from versions: none) ERROR: No matching distribution found for tensorflow-io-gcs-filesystem>=0.21.0 (from tensorflow==2.8.0)

Now to compile tensorflow-io for arm64, i cloned the git repo at https://github.com/tensorflow/io.git and ran "./configure.sh". It failed and reported that i need "tensorflow".

ERROR: Could not find a version that satisfies the requirement tensorflow<2.8.0,>=2.7.0 (from versions: none) ERROR: No matching distribution found for tensorflow<2.8.0,>=2.7.0 Traceback (most recent call last): File "tools/build/configure.py", line 18, in import tensorflow as tf ModuleNotFoundError: No module named 'tensorflow'

This looks like a circular dependency to me, "tensorflow" install from "whl" requires "tensorflow-io" and building "tensorflow-io" from source required existing "tensorflow". I'd greatly appreciate if somebody could help me out. (By the way i am using Ubuntu 20.04 server and python3)

1 Answers

found the answer on qengineering.eu/install-tensorflow-2.7-on-raspberry-64-os.html

# download tensorflow io
$ git clone -b v0.23.1 --depth=1 --recursive         https://github.com/tensorflow/io.git
$ cd io
$ python3 setup.py -q bdist_wheel --project tensorflow_io_gcs_filesystem
$ cd dist
$ sudo -H pip3 install tensorflow_io_gcs_filesystem-0.23.1-cp39-cp39-linux_aarch64.whl
Related