Unable to install tensorflow in jetson nano

I am trying install tensorflow with this command:

sudo pip3 install --pre --no-cache-dir --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu

And I am getting error like this.

Building wheel for grpcio (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-dabt9v17/grpcio/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-dabt9v17/grpcio/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ bdist_wheel -d /tmp/pip-wheel-g_tlu521 --python-tag cp36
cwd: /tmp/pip-install-dabt9v17/grpcio/
Complete output (62 lines):
Found cython-generated files…
running bdist_wheel
running build
running build_py
running build_project_metadata
creating python_build
creating python_build/lib.linux-aarch64-3.6
creating python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_interceptor.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_server.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_compression.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_auth.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_common.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_channel.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_utilities.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_plugin_wrapping.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_grpcio_metadata.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/init.py → python_build/lib.linux-aarch64-3.6/grpc
creating python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/interfaces.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/utilities.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/implementations.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/_metadata.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/_server_adaptations.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/_client_adaptations.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/init.py → python_build/lib.linux-aarch64-3.6/grpc/beta
creating python_build/lib.linux-aarch64-3.6/grpc/_cython
copying src/python/grpcio/grpc/_cython/init.py → python_build/lib.linux-aarch64-3.6/grpc/_cython
creating python_build/lib.linux-aarch64-3.6/grpc/experimental
copying src/python/grpcio/grpc/experimental/gevent.py → python_build/lib.linux-aarch64-3.6/grpc/experimental
copying src/python/grpcio/grpc/experimental/session_cache.py → python_build/lib.linux-aarch64-3.6/grpc/experimental
copying src/python/grpcio/grpc/experimental/init.py → python_build/lib.linux-aarch64-3.6/grpc/experimental
creating python_build/lib.linux-aarch64-3.6/grpc/framework
copying src/python/grpcio/grpc/framework/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework
creating python_build/lib.linux-aarch64-3.6/grpc/_cython/_cygrpc
copying src/python/grpcio/grpc/_cython/_cygrpc/init.py → python_build/lib.linux-aarch64-3.6/grpc/_cython/_cygrpc
creating python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces
copying src/python/grpcio/grpc/framework/interfaces/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces
creating python_build/lib.linux-aarch64-3.6/grpc/framework/common
copying src/python/grpcio/grpc/framework/common/style.py → python_build/lib.linux-aarch64-3.6/grpc/framework/common
copying src/python/grpcio/grpc/framework/common/cardinality.py → python_build/lib.linux-aarch64-3.6/grpc/framework/common
copying src/python/grpcio/grpc/framework/common/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework/common
creating python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/callable_util.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/stream.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/logging_pool.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/abandonment.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/future.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/stream_util.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
creating python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/base
copying src/python/grpcio/grpc/framework/interfaces/base/utilities.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/base
copying src/python/grpcio/grpc/framework/interfaces/base/base.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/base
copying src/python/grpcio/grpc/framework/interfaces/base/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/base
creating python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/face
copying src/python/grpcio/grpc/framework/interfaces/face/face.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/face
copying src/python/grpcio/grpc/framework/interfaces/face/utilities.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/face
copying src/python/grpcio/grpc/framework/interfaces/face/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/face
creating python_build/lib.linux-aarch64-3.6/grpc/_cython/_credentials
copying src/python/grpcio/grpc/_cython/_credentials/roots.pem → python_build/lib.linux-aarch64-3.6/grpc/_cython/_credentials
running build_ext
error: [Errno 2] No such file or directory: ‘cc’: ‘cc’

ERROR: Failed building wheel for grpcio
Running setup.py clean for grpcio
Failed to build grpcio
ERROR: tensorboard 1.14.0 has requirement setuptools>=41.0.0, but you’ll have setuptools 40.7.1 which is incompatible.
Installing collected packages: grpcio, werkzeug, tensorboard, tensorflow-estimator, tensorflow-gpu
Running setup.py install for grpcio … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-dabt9v17/grpcio/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-dabt9v17/grpcio/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’“‘))’ install --record /tmp/pip-record-kccb7c0s/install-record.txt --single-version-externally-managed --compile
cwd: /tmp/pip-install-dabt9v17/grpcio/
Complete output (62 lines):
Found cython-generated files…
running install
running build
running build_py
running build_project_metadata
creating python_build
creating python_build/lib.linux-aarch64-3.6
creating python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_interceptor.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_server.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_compression.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_auth.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_common.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_channel.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_utilities.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_plugin_wrapping.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/_grpcio_metadata.py → python_build/lib.linux-aarch64-3.6/grpc
copying src/python/grpcio/grpc/init.py → python_build/lib.linux-aarch64-3.6/grpc
creating python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/interfaces.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/utilities.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/implementations.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/_metadata.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/_server_adaptations.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/_client_adaptations.py → python_build/lib.linux-aarch64-3.6/grpc/beta
copying src/python/grpcio/grpc/beta/init.py → python_build/lib.linux-aarch64-3.6/grpc/beta
creating python_build/lib.linux-aarch64-3.6/grpc/_cython
copying src/python/grpcio/grpc/_cython/init.py → python_build/lib.linux-aarch64-3.6/grpc/_cython
creating python_build/lib.linux-aarch64-3.6/grpc/experimental
copying src/python/grpcio/grpc/experimental/gevent.py → python_build/lib.linux-aarch64-3.6/grpc/experimental
copying src/python/grpcio/grpc/experimental/session_cache.py → python_build/lib.linux-aarch64-3.6/grpc/experimental
copying src/python/grpcio/grpc/experimental/init.py → python_build/lib.linux-aarch64-3.6/grpc/experimental
creating python_build/lib.linux-aarch64-3.6/grpc/framework
copying src/python/grpcio/grpc/framework/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework
creating python_build/lib.linux-aarch64-3.6/grpc/_cython/_cygrpc
copying src/python/grpcio/grpc/_cython/_cygrpc/init.py → python_build/lib.linux-aarch64-3.6/grpc/_cython/_cygrpc
creating python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces
copying src/python/grpcio/grpc/framework/interfaces/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces
creating python_build/lib.linux-aarch64-3.6/grpc/framework/common
copying src/python/grpcio/grpc/framework/common/style.py → python_build/lib.linux-aarch64-3.6/grpc/framework/common
copying src/python/grpcio/grpc/framework/common/cardinality.py → python_build/lib.linux-aarch64-3.6/grpc/framework/common
copying src/python/grpcio/grpc/framework/common/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework/common
creating python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/callable_util.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/stream.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/logging_pool.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/abandonment.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/future.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/stream_util.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
copying src/python/grpcio/grpc/framework/foundation/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework/foundation
creating python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/base
copying src/python/grpcio/grpc/framework/interfaces/base/utilities.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/base
copying src/python/grpcio/grpc/framework/interfaces/base/base.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/base
copying src/python/grpcio/grpc/framework/interfaces/base/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/base
creating python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/face
copying src/python/grpcio/grpc/framework/interfaces/face/face.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/face
copying src/python/grpcio/grpc/framework/interfaces/face/utilities.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/face
copying src/python/grpcio/grpc/framework/interfaces/face/init.py → python_build/lib.linux-aarch64-3.6/grpc/framework/interfaces/face
creating python_build/lib.linux-aarch64-3.6/grpc/_cython/_credentials
copying src/python/grpcio/grpc/_cython/_credentials/roots.pem → python_build/lib.linux-aarch64-3.6/grpc/_cython/_credentials
running build_ext
error: [Errno 2] No such file or directory: ‘cc’: ‘cc’
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '”‘"’/tmp/pip-install-dabt9v17/grpcio/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-dabt9v17/grpcio/setup.py’“'”‘;f=getattr(tokenize, ‘"’“‘open’”’“‘, open)(file);code=f.read().replace(’”‘"’\r\n’“'”‘, ‘"’"’\n’“'”‘);f.close();exec(compile(code, file, ‘"’“‘exec’”’"‘))’ install --record /tmp/pip-record-kccb7c0s/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Hi,

You can find the installation steps in detail here:
https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html

Have you upgraded the pip3 tool first:

$ sudo pip3 install -U pip

Thanks.

Hi,

I am not able to install tensorflow on my Jetson Nano Jetpack Version 4.3

Installation failed at while building wheel for grpcio. I tried every thing that is mentioned in

i.e. upgrade pip3, python-dev

I got the following error

“LinkError: command ‘aarch64-linux-gnu=g++’ failed with exit status 1 and failed building wheel for grpcio”

I tried installing JP version 43, I tried all 4 wheels in
https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow/

Also when I tried installing grpcio alone, I got following message
“Keyring is skipped due to an exception: org.freedesktop.DBUS.Error.TimedOut: Failed to activate service ‘org.freedesktop.secrets’: timed out (service_start_timeout=120000ms)”

Does it have anything to do with my problem??

Is there a way to bypass installation of grpcio?

Thanks in advance.

hi, i have same problem. did you fix it?

@muhammedsezer12 No

1 Like

Same issue on Xavier NX. grpcio error. No luck…

1 Like

There is another thread here with similar issue, maybe this comment does help?

1 Like

It helps but not directly. I uninstalled setuptools 50.0.0 then tried to install setuptools 46.0.0. When installing setuptools, pip found existing setuptools 39.0.0 and uninstalled it. I think the problem is setuptools 39.0.0 because grpcio uses it to build wheels, and i can not see it, because i have setuptools 50.0.0.
So problem solved. i can suggest that uninstall all existing setuptools and try 46.0.0

1 Like

Problem is with setuptools. Downgrade it to 49.6.0 and try installing it will work.

$ sudo pip3 install setuptools==49.6.0
$ sudo pip3 install grpcio==1.31.0

This is for Jetpack4.3 and Python 3.6.9.

2 Likes

The downgrade did the trick for me running Jetpack 4.4 on Jetson NX

I had installed the tensorflow and keras commands. As per the provided link : Official TensorFlow for Jetson Nano!

But, Still i am facing a problem as mentioned below. Please guide me how to sort out this.

import tensorflow as tf
W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘libcudart.so.10.0’; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘libcudart.so.10.0’; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Segmentation fault (core dumped)