lhelontra / tensorflow-on-arm

TensorFlow for Arm
MIT License
1.05k stars 274 forks source link

Raspberry PI 4 #68

Closed Valdyme closed 4 years ago

Valdyme commented 5 years ago

Tried to install the latest 1.14 and received the error saying is not supported wheel on this platform. Any ideas?

3wnbr1 commented 5 years ago

From my experience, you either have :

EdjeElectronics commented 5 years ago

The Raspberry Pi 4 uses an ARMv8 core, so maybe that's why the armv7l and armv6l files don't work? @lhelontra , you are awesome, any way you could start building and releasing wheel files that support ARMv8? Thanks!!

Edit: Nevermind, I was wrong! See below!

When you use "pip3 install TensorFlow" it downloads an armv7l file (see image). pip TF download

It does get the "cp37" file rather than "cp35" - maybe Raspberry Pi 4 doesn't support Python 3.5?

ctcarroll commented 5 years ago

Hi @EdjeElectronics, sorry I'm not following your response. Is there a solve for the not supported wheel error, or are we just not able to install TF with this command on the pi 4? sudo pip3 install /home/pi/tf/tensorflow-1.14.0-cp35-none-linux_armv7l.whl
Are you saying the only option is to install with "pip3 install TensorFlow" instead? Thanks in advance for your help!

EdjeElectronics commented 5 years ago

Hey @ctcarroll , yes, the best option right now for installing TensorFlow on the Raspberry Pi 4 is to use "pip3 install tensorflow". (Which is a very convenient way to install it!)

The reason the .whl files in this repository won't work is because they are compiled for Python 3.5, as indicated by the "cp35" in the filename. Python 3.5 is NOT installed by default on the Pi 4, but Python 3.7 is. Thus, you need a .whl file with "cp37" in the filename, which is what is downloaded when you use "pip3 install tensorflow".

@lhelontra maybe you can start releasing files compiled for Python 3.7?

lhelontra commented 5 years ago

Hi @EdjeElectronics , next releases ll'be based in buster.

yoyojacky commented 5 years ago

I have the same problem too. my Raspberry Pi 4 B and raspbian Buster 10 has the same problem.

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: tensorflow in /home/pi/.local/lib/python3.7/site-packages (1.13.1) Requirement already satisfied: protobuf>=3.6.1 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (3.9.1) Requirement already satisfied: tensorboard<1.14.0,>=1.13.0 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (1.13.1) Requirement already satisfied: keras-preprocessing>=1.0.5 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (1.1.0) Requirement already satisfied: grpcio>=1.8.6 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (1.23.0) Requirement already satisfied: wrapt>=1.11.1 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (1.11.2) Requirement already satisfied: gast>=0.2.0 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (0.3.1) Requirement already satisfied: tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (1.14.0) Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from tensorflow) (1.12.0) Requirement already satisfied: absl-py>=0.7.0 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (0.8.0) Requirement already satisfied: astor>=0.6.0 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (0.8.0) Requirement already satisfied: wheel>=0.26 in /usr/lib/python3/dist-packages (from tensorflow) (0.32.3) Requirement already satisfied: google-pasta>=0.1.6 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (0.1.7) Requirement already satisfied: numpy<2.0,>=1.14.5 in /usr/lib/python3/dist-packages (from tensorflow) (1.16.2) Requirement already satisfied: termcolor>=1.1.0 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (1.1.0) Requirement already satisfied: keras-applications>=1.0.8 in /home/pi/.local/lib/python3.7/site-packages (from tensorflow) (1.0.8) Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from protobuf>=3.6.1->tensorflow) (40.8.0) Requirement already satisfied: markdown>=2.6.8 in /home/pi/.local/lib/python3.7/site-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow) (3.1.1) Requirement already satisfied: werkzeug>=0.11.15 in /usr/lib/python3/dist-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow) (0.14.1) Requirement already satisfied: h5py in /home/pi/.local/lib/python3.7/site-packages (from keras-applications>=1.0.8->tensorflow) (2.10.0) and my system's information is :

pi@raspberrypi:~/tf $ uname -a Linux raspberrypi 4.19.50-v7l+ #895 SMP Thu Jun 20 16:03:42 BST 2019 armv7l GNU/Linux

pi@raspberrypi:~/tf $ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster pi@raspberrypi:~/tf $

why did i install tensorflow 1.13.1 by using pip3 install tensorflow ???????

yoyojacky commented 5 years ago

The Raspberry Pi 4 uses an ARMv8 core, so maybe that's why the armv7l and armv6l files don't work? @lhelontra , you are awesome, any way you could start building and releasing wheel files that support ARMv8? Thanks!!

Edit: Nevermind, I was wrong! See below!

When you use "pip3 install TensorFlow" it downloads an armv7l file (see image). pip TF download

It does get the "cp37" file rather than "cp35" - maybe Raspberry Pi 4 doesn't support Python 3.5?

still installed tensorflow 1.13.1 but not 1.14.1 (the latest one)

Jarvis-Cai commented 4 years ago

heyyy,everyone.I use ubuntu server OS in raspberry pi 4B. And I install the version of arch64 tensorflow. But it turns out that it doesn't work. Any ideas? I have already installed the libhdf5-dev. image

yoyojacky commented 4 years ago

My Raspberry Pi 4B seems work fine now.... pi@RasPi:~/myvim $ pip3 install --upgrade tensorflow Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting tensorflow Downloading https://www.piwheels.org/simple/tensorflow/tensorflow-1.14.0-cp37-none-linux_armv7l.whl (79.6MB) |▎ | 573kB 12kB/s eta 1:42:10

lhelontra commented 4 years ago

U can install h5py from ubuntu repository

apt-get install python3-h5py

Or build youself installation