Error installed tensorflow Jetson tx2

Hi! My Name Is Kyaw Kyaw Lin. I am Deep Learning Developer. Now I try to install tensorflow-gpu==1.13.1+nv19.3 in my jetson tx2 but I got errors . Please tell me how to solve problem. Errors are below . Thank you!
python3
Python 3.6.9 (default, Apr 18 2020, 01:56:04)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import tensorflow-gpu
File “”, line 1
import tensorflow-gpu
^
SyntaxError: invalid syntax

import tensorflow
Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “/usr/local/lib/python3.6/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.6/imp.py”, line 243, in load_module
return load_dynamic(name, filename, file)
File “/usr/lib/python3.6/imp.py”, line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python3.6/dist-packages/tensorflow/init.py”, line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File “/usr/local/lib/python3.6/dist-packages/tensorflow/python/init.py”, line 49, in
from tensorflow.python import pywrap_tensorflow
File “/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py”, line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py”, line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File “/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py”, line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File “/usr/local/lib/python3.6/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.6/imp.py”, line 243, in load_module
return load_dynamic(name, filename, file)
File “/usr/lib/python3.6/imp.py”, line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory

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.

Which jetpack version are you using, JP4.3?
I guess you should check /usr/local/cuda/lib64 to see whether cuda is installed correctly.
As your log says: “ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory

1 Like

Hi,

Do you use JetPack4.4?

Please noticed that there are some dependencies between JetPack version and TensorFlow package.
You will need to install the TensorFlow package is built on the same environment as you used.

JetPack4.4 is using CUDA10.2 and please install the tensorflow-1.15.2+nv20.4.
You can find the detail installation steps in our document:
https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html

Thanks.

1 Like

Thank you for your advice. Now I already successfully installed tensorflow. But I have problem again. Please answer me again.

import tensorflow
2020-05-04 15:13:34.662914: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.2
2020-05-04 15:13:37.038567: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libnvinfer.so.7
2020-05-04 15:13:37.040571: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libnvinfer_plugin.so.7

import keras
Using TensorFlow backend.
Traceback (most recent call last):
File “”, line 1, in
File “/home/mcvdt/.local/lib/python3.6/site-packages/keras/init.py”, line 3, in
from . import utils
File “/home/mcvdt/.local/lib/python3.6/site-packages/keras/utils/init.py”, line 6, in
from . import conv_utils
File “/home/mcvdt/.local/lib/python3.6/site-packages/keras/utils/conv_utils.py”, line 9, in
from … import backend as K
File “/home/mcvdt/.local/lib/python3.6/site-packages/keras/backend/init.py”, line 1, in
from .load_backend import epsilon
File “/home/mcvdt/.local/lib/python3.6/site-packages/keras/backend/load_backend.py”, line 90, in
from .tensorflow_backend import *
File “/home/mcvdt/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py”, line 319, in
@symbolic
File “/home/mcvdt/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py”, line 68, in symbolic
if _is_tf_1():
File “/home/mcvdt/.local/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py”, line 45, in _is_tf_1
return tf.version.startswith(‘1.’)
File “/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/util/module_wrapper.py”, line 192, in getattr
attr = getattr(self._tfmw_wrapped_module, name)
AttributeError: module ‘tensorflow’ has no attribute ‘version

Thank you @juns and @AastaLLL Now I can install tensorflow and keras without error. I used following command.
sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v44 tensorflow==1.15.2+nv20.4

Good to know this.
Please noticed that our TensorFlow package v1.15.2+nv20.4 is built on JetPack4.4.

Thanks.