How to install tensorflow on Ubuntu Mate, Raspberry Pi3?


#1

Cannot install it using pip.


#2

Try downloading a matching wheel file from here and do:

pip install wheel
pip install tensorflow-1.12.0-cp27-none-linux_armv7l.whl

At least that works for Raspbian. Note a build made for Stretch with gcc 6.3 won’t necessarily work on Ubuntu MATE 16.04. If you encounter a GLIBC/GLIBCXX error you can fall back to older builds targeting Jessie, see here.


#3

Tried this but it doesn't work on ubuntu mate, whl not supported.


#4

Any luck with this so far? It seems like most installations found online will only work on a Raspbian.
Tensorflow confirms this in a way see here


#5

Ran a test on a fresh Ubuntu 16.04 MATE installation this morning. I got the GLIBCXX error with the Stretch package as expected. Rather than build or locate a recent Jessie package I just linked with libstdc++ from Bionic.

wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v1.12.0/tensorflow-1.12.0-cp27-none-linux_armv7l.whl
sudo apt install python-h5py libhdf5-dev
pip install wheel
pip install tensorflow-1.12.0-cp27-none-linux_armv7l.whl # could take 30 minutes
wget https://launchpadlibrarian.net/388451515/libstdc++6_8.2.0-1ubuntu2~18.04_armhf.deb
ar xv libstdc++6_8.2.0-1ubuntu2~18.04_armhf.deb data.tar.xz
tar xvf data.tar.xz
LD_LIBRARY_PATH=./usr/lib/arm-linux-gnueabihf python
# import tensorflow as tf
# ...

Could you elaborate what you mean by "whl not supported"? Are you getting an error when you try to pip install wheel?


#6

Thanks a lot, this works now!