Search code examples
pythontensorflowpipraspberry-pi2python-wheel

How to install TensorFlow on Raspberry Pi 2


I'm trying to install TensorFlow on a Raspberry Pi 2 with Raspian Lite OS installed on and a 8 Gb SD card. I'm using Python version 2.7.9 and I'm trying to install TensorFlow for it. I previously searched and tried to solve the problem by me but couldn't do it. Already followed these guides:

  1. TensorFlow Official Guide
  2. IotMakerBlog guide
  3. Sam J Abrahams guide on GitHub

I have also read a lot of solutions proposed in some other Stack Overflow questions, but the problem is always the same:

 tensorflow-1.1.0-cp27-none-linux_armv7l.whl is not a supported wheel on this platform.

This happens everytime I try to download the .whl and use pip to install it. Moreover, if I try to use pip directly, the error I get is the following:

# pip install tensorflow
Collecting tensorflow
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow

I also tried with pip2 as suggested in some guides and I also tried to install the Python 3 version. The result is the same as here.

Could anyone help me? Many thanks.


Solution

  • At the end I found that the problem was the processor. Indeed, with Raspbian it is considered to be ARMv6 but it is ARMv7. So, changing OS to Ubuntu MATE did the trick. Now I have installed TensorFlow on my Pi.