Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tadam98 opened this issue Mar 22, 2020 · 4 comments
Open

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

tadam98 opened this issue Mar 22, 2020 · 4 comments

Comments

@tadam98
Copy link

tadam98 commented Mar 22, 2020

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

@tadam98 tadam98 changed the title Tensorflow-on-arm RP4 Pythin 3.7 64 bits Tensorflow-on-arm RP4 Python 3.7 64 bits Mar 22, 2020
@g30ba1
Copy link

g30ba1 commented Mar 28, 2020

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
Copy link
Author

tadam98 commented Mar 28, 2020

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'

#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
Copy link

mygithope commented Apr 5, 2020 via email

@emojifreak
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants