I'm attempting to install Tensorflow 0.8.0 on an Odroid C2. The C2 uses a 64 bit ARM processor and runs Python 2.7 and 3.5 on Ubuntu 16.04, so I had hoped things would be straightforwards as I believe these are supported. From my extremely poor understanding, there seems to be a lot of confusion with different software not believing that the board is 64 bit.
$ uname -i
aarch64
$ cat /proc/cpuinfo
Processor : AArch64 Processor rev 4 (aarch64)
Following the install instructions on the tensorflow website at https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html
After a round of apt-get update, upgrade and installing dependencies, then downloading the Python 2.7 Linux 64bit version of Anaconda:
$ bash Anaconda2-4.0.0-Linux-x86_64.sh
WARNING:
Your operating system appears not to be 64-bit, but you are trying to
install a 64-bit version of Anaconda2.
Are sure you want to continue the installation? [yes|no]
Upon proceeding, the install eventually crashes
installing: conda-env-2.4.5-py27_0 ...
Anaconda2-4.0.0-Linux-x86_64.sh: line 461: /home/odroid/anaconda2/pkgs/python-2.7.11-0/bin/python: cannot execute binary file: Exec format error
ERROR:
cannot execute native linux-64 binary, output from 'uname -a' is:
Linux top-master 3.14.29-56 #1 SMP PREEMPT Wed Apr 20 12:15:54 BRT 2016 aarch64 aarch64 aarch64 GNU/Linux
I moved on, tried a pip based install.
$ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl
tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl is not a supported wheel on this platform.
(The same issue arises with pip for python 2.7)
I have seen some similar issues where despite 'not a supported wheel', some file-renaming trickery solves things. After a rename, I can install tensorflow:
$ sudo pip3 install tensorflow-0.8.0-cp35-none-any.whl
Processing ./tensorflow-0.8.0-cp35-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): protobuf==3.0.0b2 in / usr/local/lib/python3.5/dist-packages (from tensorflow==0.8.0)
Requirement already satisfied (use --upgrade to upgrade): six>=1.10.0 in /usr/li b/python3/dist-packages (from tensorflow==0.8.0)
Requirement already satisfied (use --upgrade to upgrade): wheel>=0.26 in /usr/li b/python3/dist-packages (from tensorflow==0.8.0)
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.8.2 in /usr/l ib/python3/dist-packages (from tensorflow==0.8.0)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib /python3/dist-packages (from protobuf==3.0.0b2->tensorflow==0.8.0)
Installing collected packages: tensorflow
Successfully installed tensorflow-0.8.0
However, upon:
$ python3
Python 3.5.1+ (default, Mar 30 2016, 22:46:26)
[GCC 5.3.1 20160330] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/__init__.py", line 45, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: /usr/local/lib/python3.5/dist-packages/tensorflow/python/_pywrap_tensorflow.so: cannot open shared object file: No such file or directory
Importantly, I note that this file does very much exist:
$ ls /usr/local/lib/python3.5/dist-packages/tensorflow/python
client __init__.py lib platform pywrap_tensorflow.py summary user_ops
framework kernel_tests ops __pycache__ _pywrap_tensorflow.so training util
As before, repeating the same steps with Python 2.7 causes the same problems (with slightly different folders). I am not too sure how to approach this further - I imagine attempting to build my own tensorflow is the next step, but if it is avoidable that would be excellent.
Sorry you're hitting problems Zach! I don't have experience on the odroid, but I have found that compiling directly on the device has been the best approach for platforms like the Raspberry Pi. We do have at least one report of the same approach working for the odroid too: https://github.com/tensorflow/tensorflow/issues/254#issuecomment-216918727
Does that help?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.