Dependency conflict for tf2.6 on Jetpack4.6

I seem to be stuck in a dependency conflict while trying to install tensorflow==2.6 on a TX2 with Jetpack v4.6.

I was able to get tensorflow==2.5 to work, but I need 2.6 for compatibility with a trained model.

Based on the nvidia tensorflow package repository (Index of /compute/redist/jp/v46/tensorflow) Jetpack4.6 supports tf2.6 on Nvidia Container version 21.9 with python3.6. No other python versions are supported.

tensorflow==2.6 has a dependency on h5py~=3.1.0. When I try to install h5py==3.1.0, it complains that for python==3.6 it needs numpy==1.12. At least, that seems to be the most relevant infomation from an extremely long error message. It seems strange that a newer version would have an older dependency… but anyway, when I try to install numpy==1.12, that fails too.

tensorflow==2.5 was fine with h5py2.1.0 and numpy==1.19.5

P.S.1:
when following the instructions from Installing TensorFlow For Jetson Platform :: NVIDIA Deep Learning Frameworks Documentation, this instructions works in the sense that everything installs without error messages:

pip3 install -U numpy grpcio absl-py py-cpuinfo psutil portpicker six mock requests gast h5py astor termcolor protobuf keras-applications keras-preprocessing wrapt google-pasta setuptools testresources

but this instruction fails to install h5py:

$ sudo pip3 install -U --no-deps numpy==1.19.4 future==0.18.2 mock==3.0.5 keras_preprocessing==1.1.2 keras_applications==1.0.8 gast==0.4.0 protobuf pybind11 cython pkgconfig
$ sudo env H5PY_SETUP_REQUIRES=0 pip3 install -U h5py==3.1.0

P.S.2:
this is my favourite error message so far:

ERROR: Could not find a version that satisfies the requirement h5py==3.1.0 (from versions: 2.2.1, 2.3.0b1, 2.3.0, 
2.3.1, 2.4.0b1, 2.4.0, 2.5.0, 2.6.0, 2.7.0rc2, 2.7.0, 2.7.1, 2.8.0rc1, 2.8.0, 2.9.0rc1, 2.9.0, 2.10.0, 3.0.0rc1, 3.0.0, 3.1.0)

Hi,

Please use v2.5.0 for JetPack4.6 instead.

It’s known that TensorFlow v2.6 has some issues on enabling the GPU mode.
(Although it is a different issue, the package is not working currently.)

You can find more details below:

Thanks.

Thanks for the quick reply. It’s disappointing of course, but I’ll see what I can do to work around it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.