lhelontra / tensorflow-on-arm

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

Tensorflow-on-arm RP4 Python 3.7 64 bits #85

Open tadam98 opened 4 years ago

tadam98 commented 4 years ago

Is there a 64 bit version complied with make -j4 for RP4 for Python 3.7 ? If not, how to do so ?

$ uname -a Linux raspberrypi 4.19.97-v7l+ #1294 SMP Thu Jan 30 13:21:14 GMT 2020 armv7l GNU/Linux

g30ba1 commented 4 years ago

Raspbian (All versions) runs on 32-bit.

There is no such thing like '64-bit' program built for Raspberry Pi4.

The flag -j4 has the only purpose to accelerate the build, but at the end is meaningless for installation, I mean it doesn´t matter if the build takes 2 or 4 hours.

tadam98 commented 4 years ago

Hi,

Thanks, eventually I successfully installed TF 1.14.0. It was an adventure. See working procedure below.

I was installed in a folder my Python did not search. And, I had to comment out the wrong import of cloud.

Best, Mickey

$ wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v1.14.0-buster/tensorflow-1.14.0-cp37-none-linux_armv7l.whl

Tensor flow 1.14.0

$ sudo pip install wrapt --upgrade --ignore-installed # otherwise tensorflow will fail. $ sudo pip3 install --ignore-installed tensorflow-1.14.0-cp37-none-linux_armv7l.whl

The tensorlow install places everything in /usr/local/lib/python3.7/dist-packages

while python3.7 looks in /usr/local/lib/python3.7/site-packages

to solve this, we add dist-packages to python's sys.path

$ nano /etc/profile.d/local_python.sh PYTHONPATH="/usr/local/lib/python3.7/dist-packages/":"${PYTHONPATH}" export PYTHONPATH $ source /etc/profile.d/local_python.sh $ python -c 'import sys; print (sys.path)' # this checks the correction

Python3.7

import tensorflow as tf tf.version '1.14.0'

https://github.com/lhelontra/tensorflow-on-arm/issues/67

nano /usr/local/lib/python3.7/dist-packages/tensorflow/contrib/init.py and comment:

if os.name != "nt" and platform.machine() != "s390x":

from tensorflow.contrib import cloud

mygithope commented 4 years ago

idk

On Sun, Mar 22, 2020, 07:23 tadam98 notifications@github.com wrote:

Is there a 64 bit version complied with make -j4 for RP4 ? If not, how to do so ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lhelontra/tensorflow-on-arm/issues/85, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORJRPVVVHNYB3WKUGVGFSDRIWVE3ANCNFSM4LRFZP2A .

emojifreak commented 4 years ago

The 64-bit binary https://github.com/lhelontra/tensorflow-on-arm/releases/download/v2.3.0/tensorflow-2.3.0-cp37-none-linux_aarch64.whl works fine for me. This issue can probably be closed.