Hello,
Yes of course I applied these commands before running the tensorflow install.
Though the protobuf version installed appears to be the 4.21.12
Should I downgrade the version ?
Below are the stacktrace of all these installations, as well as tensorflow
# jetson @ jetson-orin in ~ [20:02:56]
$ sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libhdf5-dev' instead of 'libhdf5-serial-dev'
gfortran is already the newest version (4:9.3.0-1ubuntu2).
gfortran set to manually installed.
libjpeg8-dev is already the newest version (8c-2ubuntu8).
libjpeg8-dev set to manually installed.
zip is already the newest version (3.0-11build1).
zip set to manually installed.
libhdf5-dev is already the newest version (1.10.4+repack-11ubuntu1).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu1.5).
The following packages were automatically installed and are no longer required:
apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dctrl-tools dpkg-repack gdal-data gir1.2-goa-1.0 gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common libarmadillo9 libarpack2 libavcodec-dev libavformat-dev libavresample-dev
libavresample4 libavutil-dev libcfitsio8 libcharls2 libdap25 libdapclient6v5 libdc1394-22-dev libdebian-installer4 libepsilon1 libexif-dev libfreexl1 libfwupdplugin1 libfyba0 libgdal26 libgdcm-dev libgdcm3.0 libgeos-3.8.0 libgeos-c1v5 libgeotiff5
libgl2ps1.4 libgphoto2-dev libhdf4-0-alt libhdf5-openmpi-103 libilmbase-dev libjbig-dev libkmlbase1 libkmldom1 libkmlengine1 liblept5 libminizip1 libnetcdf-c++4 libnetcdf15 libodbc1 libogdi4.1 libopencv-calib3d4.2 libopencv-contrib4.2
libopencv-dnn4.2 libopencv-features2d4.2 libopencv-flann4.2 libopencv-highgui4.2 libopencv-imgcodecs4.2 libopencv-imgproc4.2 libopencv-ml4.2 libopencv-objdetect4.2 libopencv-photo4.2 libopencv-shape4.2 libopencv-stitching4.2 libopencv-superres4.2
libopencv-video4.2 libopencv-videoio4.2 libopencv-videostab4.2 libopencv-viz4.2 libopencv4.2-java libopencv4.2-jni libopenexr-dev libpq5 libproj15 libqhull7 libraw1394-dev libsocket++1 libspatialite7 libsuperlu5 libswresample-dev libswscale-dev
libtesseract4 libtiff-dev libtiffxx5 libtimezonemap-data libtimezonemap1 liburiparser1 libvtk6.3 libxerces-c3.2 libxmlb1 odbcinst odbcinst1debian2 os-prober proj-data python3-icu python3-pam rdate tasksel tasksel-data
Use 'sudo apt autoremove' to remove them.
Suggested packages:
liblapack-doc
The following NEW packages will be installed:
hdf5-tools libblas-dev liblapack-dev
0 upgraded, 3 newly installed, 0 to remove and 25 not upgraded.
Need to get 3231 kB of archives.
After this operation, 25.2 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 hdf5-tools arm64 1.10.4+repack-11ubuntu1 [375 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 libblas-dev arm64 3.9.0-1build1 [92.7 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 liblapack-dev arm64 3.9.0-1build1 [2763 kB]
Fetched 3231 kB in 0s (9748 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LC_TERMINAL = "iTerm2",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package hdf5-tools.
(Reading database ... 189615 files and directories currently installed.)
Preparing to unpack .../hdf5-tools_1.10.4+repack-11ubuntu1_arm64.deb ...
Unpacking hdf5-tools (1.10.4+repack-11ubuntu1) ...
Selecting previously unselected package libblas-dev:arm64.
Preparing to unpack .../libblas-dev_3.9.0-1build1_arm64.deb ...
Unpacking libblas-dev:arm64 (3.9.0-1build1) ...
Selecting previously unselected package liblapack-dev:arm64.
Preparing to unpack .../liblapack-dev_3.9.0-1build1_arm64.deb ...
Unpacking liblapack-dev:arm64 (3.9.0-1build1) ...
Setting up hdf5-tools (1.10.4+repack-11ubuntu1) ...
Setting up liblapack-dev:arm64 (3.9.0-1build1) ...
Setting up libblas-dev:arm64 (3.9.0-1build1) ...
Processing triggers for man-db (2.9.1-1) ...
# jetson @ jetson-orin in ~ [20:08:58]
$ sudo pip3 install -U pip testresources setuptools==65.5.0
Collecting pip
Downloading pip-23.0-py3-none-any.whl (2.1 MB)
|████████████████████████████████| 2.1 MB 3.4 MB/s
Collecting testresources
Downloading testresources-2.0.1-py2.py3-none-any.whl (36 kB)
Collecting setuptools==65.5.0
Downloading setuptools-65.5.0-py3-none-any.whl (1.2 MB)
|████████████████████████████████| 1.2 MB 51.1 MB/s
Collecting pbr>=1.8
Downloading pbr-5.11.1-py2.py3-none-any.whl (112 kB)
|████████████████████████████████| 112 kB 57.6 MB/s
Installing collected packages: pip, pbr, testresources, setuptools
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'pip'. No files were found to uninstall.
Attempting uninstall: setuptools
Found existing installation: setuptools 45.2.0
Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'setuptools'. No files were found to uninstall.
Successfully installed pbr-5.11.1 pip-23.0 setuptools-65.5.0 testresources-2.0.1
# jetson @ jetson-orin in ~ [20:09:29]
$ sudo pip3 install -U numpy==1.21.1 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 packaging h5py==3.6.0
Collecting numpy==1.21.1
Downloading numpy-1.21.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (13.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.2/13.2 MB 9.5 MB/s eta 0:00:00
Requirement already satisfied: future==0.18.2 in /usr/lib/python3/dist-packages (0.18.2)
Collecting mock==3.0.5
Downloading mock-3.0.5-py2.py3-none-any.whl (25 kB)
Collecting keras_preprocessing==1.1.2
Downloading Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.6/42.6 kB 3.4 MB/s eta 0:00:00
Collecting keras_applications==1.0.8
Downloading Keras_Applications-1.0.8-py3-none-any.whl (50 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.7/50.7 kB 4.6 MB/s eta 0:00:00
Collecting gast==0.4.0
Downloading gast-0.4.0-py3-none-any.whl (9.8 kB)
Requirement already satisfied: protobuf in /usr/lib/python3/dist-packages (3.6.1)
Collecting protobuf
Downloading protobuf-4.21.12-cp37-abi3-manylinux2014_aarch64.whl (405 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 405.1/405.1 kB 26.1 MB/s eta 0:00:00
Collecting pybind11
Downloading pybind11-2.10.3-py3-none-any.whl (222 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 222.4/222.4 kB 19.8 MB/s eta 0:00:00
Collecting cython
Downloading Cython-0.29.33-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl (1.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 31.2 MB/s eta 0:00:00
Collecting pkgconfig
Downloading pkgconfig-1.5.5-py3-none-any.whl (6.7 kB)
Requirement already satisfied: packaging in /usr/lib/python3/dist-packages (20.3)
Collecting packaging
Downloading packaging-23.0-py3-none-any.whl (42 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.7/42.7 kB 3.9 MB/s eta 0:00:00
Collecting h5py==3.6.0
Downloading h5py-3.6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.5/8.5 MB 11.7 MB/s eta 0:00:00
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from mock==3.0.5) (1.14.0)
Installing collected packages: pybind11, protobuf, pkgconfig, packaging, numpy, mock, gast, cython, keras_preprocessing, h5py, keras_applications
Attempting uninstall: protobuf
Found existing installation: protobuf 3.6.1
Uninstalling protobuf-3.6.1:
Successfully uninstalled protobuf-3.6.1
Attempting uninstall: packaging
Found existing installation: packaging 20.3
Uninstalling packaging-20.3:
Successfully uninstalled packaging-20.3
Attempting uninstall: numpy
Found existing installation: numpy 1.17.4
Uninstalling numpy-1.17.4:
Successfully uninstalled numpy-1.17.4
Successfully installed cython-0.29.33 gast-0.4.0 h5py-3.6.0 keras_applications-1.0.8 keras_preprocessing-1.1.2 mock-3.0.5 numpy-1.21.1 packaging-23.0 pkgconfig-1.5.5 protobuf-4.21.12 pybind11-2.10.3
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
# jetson @ jetson-orin in ~ [20:12:55]
$ sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v51 tensorflow==2.11.0+nv23.01
Looking in indexes: https://pypi.org/simple, https://developer.download.nvidia.com/compute/redist/jp/v51
Collecting tensorflow==2.11.0+nv23.01
Downloading https://developer.download.nvidia.com/compute/redist/jp/v51/tensorflow/tensorflow-2.11.0%2Bnv23.01-cp38-cp38-linux_aarch64.whl (483.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 483.5/483.5 MB 7.1 MB/s eta 0:00:00
Collecting tensorboard<2.12,>=2.11
Downloading tensorboard-2.11.2-py3-none-any.whl (6.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.0/6.0 MB 32.9 MB/s eta 0:00:00
Requirement already satisfied: packaging in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.11.0+nv23.01) (23.0)
Requirement already satisfied: gast<=0.4.0,>=0.2.1 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.11.0+nv23.01) (0.4.0)
Requirement already satisfied: numpy>=1.20.0 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.11.0+nv23.01) (1.21.1)
Collecting grpcio<2.0,>=1.24.3
Downloading grpcio-1.51.1-cp38-cp38-manylinux_2_17_aarch64.whl (71.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.8/71.8 MB 8.7 MB/s eta 0:00:00
Collecting tensorflow-estimator<2.12,>=2.11.0
Downloading tensorflow_estimator-2.11.0-py2.py3-none-any.whl (439 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 439.2/439.2 kB 19.3 MB/s eta 0:00:00
Collecting libclang>=13.0.0
Downloading libclang-15.0.6.1-py2.py3-none-manylinux2014_aarch64.whl (19.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 19.4/19.4 MB 54.5 MB/s eta 0:00:00
Collecting termcolor>=1.1.0
Downloading termcolor-2.2.0-py3-none-any.whl (6.6 kB)
Collecting absl-py>=1.0.0
Downloading absl_py-1.4.0-py3-none-any.whl (126 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.5/126.5 kB 8.1 MB/s eta 0:00:00
Collecting wrapt>=1.11.0
Downloading wrapt-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (81 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.2/81.2 kB 4.0 MB/s eta 0:00:00
Collecting flatbuffers>=2.0
Downloading flatbuffers-23.1.21-py2.py3-none-any.whl (26 kB)
Collecting google-pasta>=0.1.1
Downloading google_pasta-0.2.0-py3-none-any.whl (57 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.5/57.5 kB 2.4 MB/s eta 0:00:00
Requirement already satisfied: h5py>=2.9.0 in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.11.0+nv23.01) (3.6.0)
Requirement already satisfied: six>=1.12.0 in /usr/lib/python3/dist-packages (from tensorflow==2.11.0+nv23.01) (1.14.0)
Collecting opt-einsum>=2.3.2
Downloading opt_einsum-3.3.0-py3-none-any.whl (65 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 kB 2.9 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /usr/local/lib/python3.8/dist-packages (from tensorflow==2.11.0+nv23.01) (65.5.0)
Collecting keras<2.12,>=2.11.0
Downloading keras-2.11.0-py2.py3-none-any.whl (1.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 41.4 MB/s eta 0:00:00
Collecting typing-extensions>=3.6.6
Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting astunparse>=1.6.0
Downloading astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting protobuf<4.0.0,>=3.9.2
Downloading protobuf-3.20.3-cp38-cp38-manylinux2014_aarch64.whl (918 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 918.6/918.6 kB 30.4 MB/s eta 0:00:00
Requirement already satisfied: wheel<1.0,>=0.23.0 in /usr/lib/python3/dist-packages (from astunparse>=1.6.0->tensorflow==2.11.0+nv23.01) (0.34.2)
Collecting tensorboard-plugin-wit>=1.6.0
Downloading tensorboard_plugin_wit-1.8.1-py3-none-any.whl (781 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 781.3/781.3 kB 26.0 MB/s eta 0:00:00
Collecting tensorboard-data-server<0.7.0,>=0.6.0
Downloading tensorboard_data_server-0.6.1-py3-none-any.whl (2.4 kB)
Requirement already satisfied: requests<3,>=2.21.0 in /usr/lib/python3/dist-packages (from tensorboard<2.12,>=2.11->tensorflow==2.11.0+nv23.01) (2.22.0)
Collecting google-auth<3,>=1.6.3
Downloading google_auth-2.16.0-py2.py3-none-any.whl (177 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 177.8/177.8 kB 9.1 MB/s eta 0:00:00
Collecting werkzeug>=1.0.1
Downloading Werkzeug-2.2.2-py3-none-any.whl (232 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.7/232.7 kB 10.5 MB/s eta 0:00:00
Requirement already satisfied: markdown>=2.6.8 in /usr/lib/python3/dist-packages (from tensorboard<2.12,>=2.11->tensorflow==2.11.0+nv23.01) (3.1.1)
Collecting google-auth-oauthlib<0.5,>=0.4.1
Downloading google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)
Collecting pyasn1-modules>=0.2.1
Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 kB 7.1 MB/s eta 0:00:00
Collecting rsa<5,>=3.1.4
Downloading rsa-4.9-py3-none-any.whl (34 kB)
Collecting cachetools<6.0,>=2.0.0
Downloading cachetools-5.3.0-py3-none-any.whl (9.3 kB)
Collecting requests-oauthlib>=0.7.0
Downloading requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting MarkupSafe>=2.1.1
Downloading MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (26 kB)
Collecting pyasn1<0.5.0,>=0.4.6
Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.1/77.1 kB 3.7 MB/s eta 0:00:00
Requirement already satisfied: oauthlib>=3.0.0 in /usr/lib/python3/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.12,>=2.11->tensorflow==2.11.0+nv23.01) (3.1.0)
Installing collected packages: tensorboard-plugin-wit, pyasn1, libclang, flatbuffers, wrapt, typing-extensions, termcolor, tensorflow-estimator, tensorboard-data-server, rsa, requests-oauthlib, pyasn1-modules, protobuf, opt-einsum, MarkupSafe, keras, grpcio, google-pasta, cachetools, astunparse, absl-py, werkzeug, google-auth, google-auth-oauthlib, tensorboard, tensorflow
Attempting uninstall: protobuf
Found existing installation: protobuf 4.21.12
Uninstalling protobuf-4.21.12:
Successfully uninstalled protobuf-4.21.12
Attempting uninstall: MarkupSafe
Found existing installation: MarkupSafe 1.1.0
Uninstalling MarkupSafe-1.1.0:
Successfully uninstalled MarkupSafe-1.1.0
Successfully installed MarkupSafe-2.1.2 absl-py-1.4.0 astunparse-1.6.3 cachetools-5.3.0 flatbuffers-23.1.21 google-auth-2.16.0 google-auth-oauthlib-0.4.6 google-pasta-0.2.0 grpcio-1.51.1 keras-2.11.0 libclang-15.0.6.1 opt-einsum-3.3.0 protobuf-3.20.3 pyasn1-0.4.8 pyasn1-modules-0.2.8 requests-oauthlib-1.3.1 rsa-4.9 tensorboard-2.11.2 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 tensorflow-2.11.0+nv23.1 tensorflow-estimator-2.11.0 termcolor-2.2.0 typing-extensions-4.4.0 werkzeug-2.2.2 wrapt-1.14.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
But then:
# jetson @ jetson-orin in ~ [20:29:07]
$ python3
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/dist-packages/tensorflow/__init__.py", line 37, in <module>
from tensorflow.python.tools import module_util as _module_util
File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/__init__.py", line 37, in <module>
from tensorflow.python.eager import context
File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/eager/context.py", line 28, in <module>
from tensorflow.core.framework import function_pb2
File "/usr/local/lib/python3.8/dist-packages/tensorflow/core/framework/function_pb2.py", line 16, in <module>
from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
File "/usr/local/lib/python3.8/dist-packages/tensorflow/core/framework/attr_value_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
File "/usr/local/lib/python3.8/dist-packages/tensorflow/core/framework/tensor_pb2.py", line 16, in <module>
from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
File "/usr/local/lib/python3.8/dist-packages/tensorflow/core/framework/resource_handle_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File "/usr/local/lib/python3.8/dist-packages/tensorflow/core/framework/tensor_shape_pb2.py", line 36, in <module>
_descriptor.FieldDescriptor(
File "/home/jetson/.local/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 560, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates