TensorFlow 1.7 whl issue on TX2

Hi
I build Tensorflow 1.7 on my TX2. i installed it using sudo pip3 install tensorflow-1.7.0-cp35-cp35m-linux_aarch64.whl. THere were no errors as you see below

Successfully installed tensorboard-1.7.0 tensorflow-1.7.0

In PYthon3 when i say import tensorflow as tf I am getting below error

Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
_mod = imp.load_module(’_pywrap_tensorflow_internal’, 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_internal.so: undefined symbol: _ZN3Aws11Environment6GetEnvB5cxx11EPKc

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python3.5/dist-packages/tensorflow/init.py”, line 24, in
from tensorflow.python import * # pylint: disable=redefined-builtin
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/init.py”, line 49, in
from tensorflow.python import pywrap_tensorflow
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py”, line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py”, line 24, in swig_import_helper
_mod = imp.load_module(’_pywrap_tensorflow_internal’, 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_internal.so: undefined symbol: _ZN3Aws11Environment6GetEnvB5cxx11EPKc

i looked upt https://www.tensorflow.org/install/install_sources#common_installation_problems but it is of no help.

I searched google but still of no help

I am running CUDA 9.0 Cudnn 7.0.5 and PYthon 3.5

I tried with Tensorflow 1.6 and also 1.5 but same issue

Hoping someone can help me here. Thanks in advance

You may look through forum threads on tensorflow installation.
I am inclined to believe there were whl shared at a number of threads.
You may use for reference:
https://devtalk.nvidia.com/default/topic/1031300/tensorflow-1-7-wheel-with-jetpack-3-2-/
You may also try install 27 python tensorflow.
As far as I am concerned you may need to export PATH’s of either python or CUDA or both.
somewhat github: repo https://github.com/peterlee0127/tensorflow-nvJetson

well i downloaded whl file from https://devtalk.nvidia.com/default/topic/1031300/jetson-tx2/tensorflow-1-7-wheel-with-jetpack-3-2-/?offset=29#5254966

i uninstalled mine and installed the one i downloaded. Worke good with python3.5. Thanks though for help

Same error as above

_pywrap_tensorflow_internal.so: undefined symbol: _ZN3Aws11Environment6GetEnvB5cxx11EPKc

Setup: ubuntu 16.04, Jetson TX1, Python3.5, Bazel 0.17.2

git clone https://github.com/mozilla/tensorflow.git
./configure (only enabled CUDA)
bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

After several hours, get the same import error as above with AWS. As per this link http://www.singleye.net/2018/04/build-tensorflow-v1.7-on-nvidia-jetson-tx2/, they suggest disabling S3 but I never enabled it when running ./configure.

I can’t use py 2.7 and need to build tensorflow source.

Thanks for your time.

If you are not going to use AWS stuffs with tensorflow, you could try saying no to the following question during ‘./configure’. See if that solves the problem.

Do you wish to build TensorFlow with Amazon S3 File System support? [Y/n]: n

Here’s how I built tensorflow-1.8.0 for python3 on JTX2. FYR.

https://jkjung-avt.github.io/build-tensorflow-1.8.0/

Thanks @ jkjung13

Definitely not using AWS. But with the tensorflow version that am using (git clone https://github.com/mozilla/tensorflow.git), I don’t even get that S3 option during the configure step.

Let me uninstall and try your process with the mozilla tensorflow (v 1.11). Since the S3/AWS option doesn’t appear, am editing .tf_configure.bazelrc to explicitly disable S3

build --action_env TF_NEED_S3=“0”

For some odd reason that still tries to compile aws but not when I export the variable.

export TF_NEED_S3=0

I’ll share the results.

With the latest tensorflow from Mozilla, first got the error:

gcc: error: unrecognized command line option ‘-mfpu=neon’

so got rid of that option in the file /tensorflow/contrib/lite/kernels/internal/BUILD

and 4-5 hrs later got the same error as before

ImportError: /home/nvidia/.cache/bazel/_bazel_nvidia/d2751a49dacf4cb14a513ec663770624/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/_pywrap_tensorflow_internal.so: undefined symbol: _ZN3Aws11Environment6GetEnvB5cxx11EPKc

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Target //tensorflow/tools/pip_package:build_pip_package failed to build

And just a few lines before the above error, get this:

ERROR: /home/nvidia/tensorflow/tensorflow/BUILD:557:1: Executing genrule //tensorflow:tf_python_api_gen_v1 failed (Exit 1)
Traceback (most recent call last):
File “/home/nvidia/.cache/bazel/_bazel_nvidia/d2751a49dacf4cb14a513ec663770624/execroot/org_tensorflow/bazel-out/host/bin/tensorflow/create_tensorflow.python_api_1.runfiles/org_tensorflow/tensorflow/python/pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *

So disabling S3 via the env. variable and setting TF_NEED_S3=0 does not appear to suffice to prevent building the S3 filesystem.

Still debugging …

Hi,

Not sure the difference between official and Mozilla version.

Here is a script to build official v1.6 from source for your reference:

Thanks.

Thanks. Actually got the latest tensorflow version (1.11) to build successfully with the following steps:

In the BUILD file here: /home/<user_name>/.cache/bazel/bazel<user_name>//external/aws/BUILD.bazel
if I edit the section cc_library to replace:

“//conditions:default”: "

with

“//conditions:default”: glob([“aws-cpp-sdk-core/source/platform/linux-shared/*.cpp”,]),

So there appears to be build issues with the AWS SDK on aarch64. I followed instructions from these two links:

https://devtalk.nvidia.com/default/topic/1031642/jetson-tx2/tensorflow-serving-on-jetson-tx2/
https://github.com/tensorflow/serving/issues/832

Let me see if there are any runtime issues and if there are, then I’ll try tf v1.6 as per instructions in the AastaNV link.