Skip to content

Latest commit

 

History

History
53 lines (46 loc) · 1.45 KB

19.1-install-tensorflow-lite.md

File metadata and controls

53 lines (46 loc) · 1.45 KB

Install TensorFlow Lite

How to Install TensorFlow Lite on Raspberry Pi 3 Model B+

Prerequisite(s):

Install a few libraries to help with the OpenCV and TensorFlow Lite backend and GUI processing:

pi@raspberry:~ $ sudo apt -y install qt4-dev-tools libatlas-base-dev libhdf5-103

1 - Create and Activate Python Virtual Environment


pi@raspberry:~ $ mkdir -p Projects/Python/tensorflow-env
pi@raspberry:~ $ cd Projects/Python/tensorflow-env
pi@raspberry:~ $ python -m venv tensorflow-env
pi@raspberry:~ $ source tensorflow-env/bin/activate
(tensorflow-env) pi@raspberry:~ $

2 - Install TensorFlow Lite


(tensorflow-env) pi@raspberry:~ $ python3 -m pip install tflite-runtime

4 - Verify TensorFlow Working Correctly


(tensorflow-env) pi@raspberry:~ $ python
>>> import tensorflow
>>> tensorflow.__version__
'X.X.X'
>>>

Ctrl+D


Remove TensorFlow


(tensorflow-env) pi@raspberry:~ $ sudo pip uninstall tensorboard
(tensorflow-env) pi@raspberry:~ $ sudo pip uninstall tensorflow
(tensorflow-env) pi@raspberry:~ $ sudo pip uninstall tflite-runtime