Tensorflow supported python 3.12 since version 2.12.
https://github.com/tensorflow/tensorflo ... ag/v2.12.0
Tensorflow 2.16.1 installs and runs fine on Pi 5 8GB running Bookworm 64-bit.
https://github.com/tensorflow/tensorflo ... ag/v2.12.0
Tensorflow 2.16.1 installs and runs fine on Pi 5 8GB running Bookworm 64-bit.
Code:
pi@pi58gb01:~/ $ mkdir -p temp/test && cd ./temp/testpi@pi58gb01:~/temp/test $ python --versionPython 3.11.2pi@pi58gb01:~/temp/test $ python -m venv venvpi@pi58gb01:~/temp/test $ . venv/bin/activate(venv) pi@pi58gb01:~/temp/test $ pip install tensorflowLooking in indexes: https://pypi.org/simple, https://www.piwheels.org/simpleCollecting tensorflow Using cached tensorflow-2.16.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (218.9 MB)Collecting absl-py>=1.0.0 Using cached https://www.piwheels.org/simple/absl-py/absl_py-2.1.0-py3-none-any.whl (133 kB)Collecting astunparse>=1.6.0 Using cached https://www.piwheels.org/simple/astunparse/astunparse-1.6.3-py2.py3-none-any.whl (12 kB)Collecting flatbuffers>=23.5.26 Using cached https://www.piwheels.org/simple/flatbuffers/flatbuffers-20181003210633-py2.py3-none-any.whl (14 kB)Collecting gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1 Using cached https://www.piwheels.org/simple/gast/gast-0.5.4-py3-none-any.whl (19 kB)Collecting google-pasta>=0.1.1 Using cached https://www.piwheels.org/simple/google-pasta/google_pasta-0.2.0-py3-none-any.whl (57 kB)Collecting h5py>=3.10.0 Using cached h5py-3.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.1 MB)Collecting libclang>=13.0.0 Using cached libclang-18.1.1-py2.py3-none-manylinux2014_aarch64.whl (23.8 MB)Collecting ml-dtypes~=0.3.1 Using cached ml_dtypes-0.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.2 MB)Collecting opt-einsum>=2.3.2 Using cached https://www.piwheels.org/simple/opt-einsum/opt_einsum-3.3.0-py3-none-any.whl (65 kB)Collecting packaging Using cached https://www.piwheels.org/simple/packaging/packaging-24.0-py3-none-any.whl (53 kB)Collecting protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3 Using cached protobuf-4.25.3-cp37-abi3-manylinux2014_aarch64.whl (293 kB)Collecting requests<3,>=2.21.0 Using cached https://www.piwheels.org/simple/requests/requests-2.31.0-py3-none-any.whl (62 kB)Requirement already satisfied: setuptools in ./venv/lib/python3.11/site-packages (from tensorflow) (66.1.1)Collecting six>=1.12.0 Using cached https://www.piwheels.org/simple/six/six-1.16.0-py2.py3-none-any.whl (11 kB)Collecting termcolor>=1.1.0 Using cached https://www.piwheels.org/simple/termcolor/termcolor-2.4.0-py3-none-any.whl (7.7 kB)Collecting typing-extensions>=3.6.6 Using cached https://www.piwheels.org/simple/typing-extensions/typing_extensions-4.10.0-py3-none-any.whl (33 kB)Collecting wrapt>=1.11.0 Using cached wrapt-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (80 kB)Collecting grpcio<2.0,>=1.24.3 Using cached grpcio-1.62.1-cp311-cp311-manylinux_2_17_aarch64.whl (5.3 MB)Collecting tensorboard<2.17,>=2.16 Using cached tensorboard-2.16.2-py3-none-any.whl (5.5 MB)Collecting keras>=3.0.0 Using cached https://www.piwheels.org/simple/keras/keras-3.1.1-py3-none-any.whl (1.1 MB)Collecting tensorflow-io-gcs-filesystem>=0.23.1 Using cached tensorflow_io_gcs_filesystem-0.36.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.8 MB)Collecting numpy<2.0.0,>=1.23.5 Using cached numpy-1.26.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (14.2 MB)Collecting wheel<1.0,>=0.23.0 Using cached https://www.piwheels.org/simple/wheel/wheel-0.43.0-py3-none-any.whl (65 kB)Collecting rich Using cached https://www.piwheels.org/simple/rich/rich-13.7.1-py3-none-any.whl (240 kB)Collecting namex Using cached https://www.piwheels.org/simple/namex/namex-0.0.7-py3-none-any.whl (5.8 kB)Collecting optree Using cached optree-0.10.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (261 kB)Collecting charset-normalizer<4,>=2 Using cached charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (136 kB)Collecting idna<4,>=2.5 Using cached https://www.piwheels.org/simple/idna/idna-3.6-py3-none-any.whl (61 kB)Collecting urllib3<3,>=1.21.1 Using cached https://www.piwheels.org/simple/urllib3/urllib3-2.2.1-py3-none-any.whl (121 kB)Collecting certifi>=2017.4.17 Using cached https://www.piwheels.org/simple/certifi/certifi-2024.2.2-py3-none-any.whl (163 kB)Collecting markdown>=2.6.8 Using cached https://www.piwheels.org/simple/markdown/Markdown-3.6-py3-none-any.whl (105 kB)Collecting tensorboard-data-server<0.8.0,>=0.7.0 Using cached tensorboard_data_server-0.7.2-py3-none-any.whl (2.4 kB)Collecting werkzeug>=1.0.1 Using cached https://www.piwheels.org/simple/werkzeug/werkzeug-3.0.1-py3-none-any.whl (226 kB)Collecting MarkupSafe>=2.1.1 Using cached MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (29 kB)Collecting markdown-it-py>=2.2.0 Using cached https://www.piwheels.org/simple/markdown-it-py/markdown_it_py-3.0.0-py3-none-any.whl (87 kB)Collecting pygments<3.0.0,>=2.13.0 Using cached https://www.piwheels.org/simple/pygments/pygments-2.17.2-py3-none-any.whl (1.2 MB)Collecting mdurl~=0.1 Using cached https://www.piwheels.org/simple/mdurl/mdurl-0.1.2-py3-none-any.whl (10.0 kB)Installing collected packages: namex, libclang, flatbuffers, wrapt, wheel, urllib3, typing-extensions, termcolor, tensorflow-io-gcs-filesystem, tensorboard-data-server, six, pygments, protobuf, packaging, numpy, mdurl, MarkupSafe, markdown, idna, grpcio, gast, charset-normalizer, certifi, absl-py, werkzeug, requests, optree, opt-einsum, ml-dtypes, markdown-it-py, h5py, google-pasta, astunparse, tensorboard, rich, keras, tensorflowSuccessfully installed MarkupSafe-2.1.5 absl-py-2.1.0 astunparse-1.6.3 certifi-2024.2.2 charset-normalizer-3.3.2 flatbuffers-20181003210633 gast-0.5.4 google-pasta-0.2.0 grpcio-1.62.1 h5py-3.10.0 idna-3.6 keras-3.1.1 libclang-18.1.1 markdown-3.6 markdown-it-py-3.0.0 mdurl-0.1.2 ml-dtypes-0.3.2 namex-0.0.7 numpy-1.26.4 opt-einsum-3.3.0 optree-0.10.0 packaging-24.0 protobuf-4.25.3 pygments-2.17.2 requests-2.31.0 rich-13.7.1 six-1.16.0 tensorboard-2.16.2 tensorboard-data-server-0.7.2 tensorflow-2.16.1 tensorflow-io-gcs-filesystem-0.36.0 termcolor-2.4.0 typing-extensions-4.10.0 urllib3-2.2.1 werkzeug-3.0.1 wheel-0.43.0 wrapt-1.16.0(venv) pi@pi58gb01:~/temp/test $(venv) pi@pi58gb01:~/temp/test $(venv) pi@pi58gb01:~/temp/test $ pythonPython 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import tensorflow as tf>>> hello = tf.constant('Hello, TensorFlow!')>>> hello.numpy()b'Hello, TensorFlow!'>>> exit()(venv) pi@pi58gb01:~/temp/test $
Statistics: Posted by memjr — Fri Mar 22, 2024 11:02 pm