Welcome to Raspberry Pi 4B repository
3.8 Install Tensorflow
1. We need remote transfer the installation package needed for this installation of tensorflow into the Raspberry Pi through WinSCP software.
For example, we can transfer them on /home/pi directory.
Input following command, we can see three file.
ls
2. Install tensorflow
2.1 Input following command to install pip tools:
sudo apt-get install python3-pip python3-dev
2.1 Input following command to install some dependencies pack.
pip3 install h5py-2.10.0-cp37-cp37m-linux_armv7l.whl
pip3 install grpcio-1.32.0-cp37-cp37m-linux_armv7l.whl
pip3 install tensorflow-1.14.0-cp37-none-linux_armv7l.whl
3. Test tensorflow
After the installation is complete, enter the following commands in the terminal to check whether tensorflow is successfully installed.
python3
import tensorflow as tf
tf.__version__
As shown below.
Input following command to check tensorflow installation path
tf.__path__
Input following command to test.
hello = tf.constant('Hello,Tensorflow')
sess = tf.Session()
print(sess.run(hello))
As shown below.