Official TensorFlow for Jetson Nano!

Hello,

currently I’m trying to install Tensorflow on my Jetson Nano with JetPack 4.3.
Unfortunately I’m getting the following error:

embsys@embsys-desktop:~$ sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v43 tensorflow==2.1.0+nv20.3
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)
WARNING: The directory ‘/home/embsys/.cache/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Looking in indexes: https://pypi.org/simple, https://developer.download.nvidia.com/compute/redist/jp/v43
Collecting tensorflow==2.1.0+nv20.3
Downloading https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow/tensorflow-2.1.0%2Bnv20.3-cp36-cp36m-linux_aarch64.whl (236.9 MB)
|████████████████████████████████| 236.9 MB 1.5 MB/s
ERROR: Requested tensorflow==2.1.0+nv20.3 from https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow/tensorflow-2.1.0%2Bnv20.3-cp36-cp36m-linux_aarch64.whl has different version in metadata: ‘2.1.0+nv20.3.tf2’

Has anyone else had this issue?

I tried installing Tensorflow on JetPack 4.4, there it worked fine.
Unfortunately I have some other dependencies in my project that I need to stay on JetPack 4.3 at the moment.

I also tried to install different versions of Tensorflow (also 1.15.2) and different Tensorflow containers.
I always get the same error.

Any help would be appreciated.

Thanks!
Greetings, Alex

Ok, nevermind. I found a thread about another problem during the installation.
The solution also worked for me.
The thread was: Tensorflow "no matching distribution"

Environment: (ISO file: jetson-nano-4gb-jp441-sd-card-image.zip)
I got error as below:

ken@AI:~$ sudo apt-get install libhdf5-serial-dev
[sudo] password for ken:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libhdf5-serial-dev : Depends: libhdf5-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

ken@AI:~$ sudo apt-get install libhdf5-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libhdf5-dev : Depends: libjpeg-dev
E: Unable to correct problems, you have held broken packages.

ken@AI:~$ sudo apt-get install libjpeg-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libjpeg-dev : Depends: libjpeg8-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

ken@AI:~$ sudo apt-get install libjpeg8-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libjpeg8-dev : Depends: libjpeg-turbo8-dev (>= 1.1.90+svn722-1ubuntu6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

ken@AI:~$ sudo apt-get install libjpeg-turbo8-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libjpeg-turbo8-dev : Depends: libjpeg-turbo8 (= 1.5.2-0ubuntu5) but 1.5.2-0ubuntu5.18.04.4 is to be installed
E: Unable to correct problems, you have held broken packages.

ken@AI:~$ sudo apt-get install libjpeg-turbo8
Reading package lists… Done
Building dependency tree
Reading state information… Done
libjpeg-turbo8 is already the newest version (1.5.2-0ubuntu5.18.04.4).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Anyone know how to resolve the problem?

Thanks for help!

I try to burn jetpack 4.4 iso file and install again. Now the environment(tensorflow 2.3.1) is ok now. I think jetpack 4.4.1 is not ready for now, it is recommended not to use version 4.4.1.

Hi, just flashed a JP43 and I’m getting this error trying the recommended version (+nv20.3) and the one I had working before (+nv20.1):

ns@entrada-jp43:~/workspace/nspi$ pip3 install -i https://developer.download.nvidia.com/compute/redist/jp/v43 tensorflow-gpu==1.15.0+nv20.1
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://developer.download.nvidia.com/compute/redist/jp/v43
Collecting tensorflow-gpu==1.15.0+nv20.1
  Using cached https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow-gpu/tensorflow_gpu-1.15.0%2Bnv20.1-cp36-cp36m-linux_aarch64.whl (228.6 MB)
WARNING: Discarding https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow-gpu/tensorflow_gpu-1.15.0%2Bnv20.1-cp36-cp36m-linux_aarch64.whl (from https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow-gpu/). Requested tensorflow-gpu==1.15.0+nv20.1 from https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow-gpu/tensorflow_gpu-1.15.0%2Bnv20.1-cp36-cp36m-linux_aarch64.whl has different version in metadata: '1.15.0+nv20.1.tf1'
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==1.15.0+nv20.1
ERROR: No matching distribution found for tensorflow-gpu==1.15.0+nv20.1

ns@entrada-jp43:~/workspace/nspi$ pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v43 tensorflow==1.15.2+nv20.3
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://developer.download.nvidia.com/compute/redist/jp/v43
Collecting tensorflow==1.15.2+nv20.3
  Downloading https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow/tensorflow-1.15.2%2Bnv20.3-cp36-cp36m-linux_aarch64.whl (229.1 MB)
     |████████████████████████████████| 229.1 MB 1.3 kB/s
WARNING: Discarding https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow/tensorflow-1.15.2%2Bnv20.3-cp36-cp36m-linux_aarch64.whl (from https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow/). Requested tensorflow==1.15.2+nv20.3 from https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow/tensorflow-1.15.2%2Bnv20.3-cp36-cp36m-linux_aarch64.whl has different version in metadata: '1.15.2+nv20.3.tf1'
ERROR: Could not find a version that satisfies the requirement tensorflow==1.15.2+nv20.3
ERROR: No matching distribution found for tensorflow==1.15.2+nv20.3

On both cases the error is the same. Apparently the metadata for the wheel has a different name ending in .tf1 (I wonder where it came from). Is there any workaround? Unless I’m doing something odd, these are stock wheels for latest versions of tensorflow 1.1.

Any recommendation on how to fix this?
Thank you.

Same exact error I’m getting on JP4.3. The packages contain an extra .tf1 and .tf2 suffixes in the package name in the metadata preventing them from being installed.

Apparently the filenames of the wheels should match the names in the metadata, and they don’t.
This is the listing of https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow-gpu/ :
None have any .tf1 or .tf2 suffix, but apparently they do have .tf1 and .tf2 suffixes in their metadata.

* [tensorflow_gpu-2.0.0+nv19.12-cp36-cp36m-linux_aarch64.whl](https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow-gpu/tensorflow_gpu-2.0.0+nv19.12-cp36-cp36m-linux_aarch64.whl) 198MB 2019-12-21 02:12:48
* [tensorflow_gpu-1.15.0+nv19.12-cp36-cp36m-linux_aarch64.whl](https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow-gpu/tensorflow_gpu-1.15.0+nv19.12-cp36-cp36m-linux_aarch64.whl) 217MB 2019-12-21 02:13:13
* [tensorflow_gpu-2.0.0+nv20.1-cp36-cp36m-linux_aarch64.whl](https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow-gpu/tensorflow_gpu-2.0.0+nv20.1-cp36-cp36m-linux_aarch64.whl) 198MB 2020-01-28 20:56:15
* [tensorflow_gpu-1.15.0+nv20.1-cp36-cp36m-linux_aarch64.whl](https://developer.download.nvidia.com/compute/redist/jp/v43/tensorflow-gpu/tensorflow_gpu-1.15.0+nv20.1-cp36-cp36m-linux_aarch64.whl) 217MB 2020-01-28 22:08:07

Apparently the latest version(s) of pip is/are stricter about that metadata inconsistency and won’t install the package, as opposed to whatever pip most people may be using, including package maintainers?

Could anyone confirm this? @dusty_nv, @AastaLLL?

pip version I’m using is 20.3.2.

Thank you.
Best regards.

PS: Well, this is odd. If you download the very same .whl that pip refuses to install from an index, it gets installed successfully when the .whl is downloaded and installed from the filesystem (and without even a warning about the metadata version mismatch stuff). So this manual download/installation apparently solved my problem.

1 Like

You are totally right, i solved this problem just changing my pip version:

/usr/bin/python3 -m pip install pip==20.1

For me h5py==2.9.0 fails to install with very long error log: https://pastebin.com/T7RSX0dC. I just recently started over with fresh SD card image. In previous system (based on exactly the same SD card image) this was also an issue. I’m using Jetpack 4.4.1 [L4T 32.4.4]. I was able to solve the issue by removing “==2.9.0”. The Installation guide suggests to use 2.10.0 in one place but in another place it suggests to install without specifing the h5py version so I decided to try that first and it worked. But during installation of TensorFlow 2.3.1, it automatically removed h5py 3.1.0 and installed h5py-2.10.0 instead, so it seems that 2.10.0 is the right h5py version for TensorFlow 2.3.1.

Hello I am installing the Tensorflow now but I met some problems.
I think I have installed the tensorflow successfully.

when I test directly in the CMD line

qiaoys@qiaoys:~$ python3
Python 3.6.9 (default, Oct 8 2020, 12:12:24)
[GCC 8.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import tensorflow as tf
2021-01-23 21:43:47.300934: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.2

print(tf.version)
2.3.1

so it seems good .
but when I am in the JupyterLab

import tensorflow as tf
print(tf.version)

ModuleNotFoundError Traceback (most recent call last)
in
----> 1 import tensorflow as tf
2 print(tf.version)

ModuleNotFoundError: No module named ‘tensorflow’

it shows can not find tensorflow. Does someone know why and give me some suggestions? Thanks very much !

Are you sure you are using python3 in Jupyter Lab and not python2? If it is running python2 then this is expected result. You can use the following code to check python version:

import platform
print(platform.python_version())

OK, Thanks for your suggestion
I tried as you said
it shows 3.6.9

Perhaps you are running python3 in different environment than normally. For example, if you installed tensorflow only for your user and not system-wide and running Jupyter Lab as different user. Or maybe your installation of Jupyter Lab runs python3 in isolated virtual environment where tensorflow is not installed.

Yes, I also think so. they are maybe in different environment. thanks for your reply ,that is still very helpful.

same problem with you . Have you solved this problem ?

[Version] How To Check the version of TensorFlow Container?


This means the Docker Version?

sudo docker version

Hello expert,

I am trying to install TensorFlow on my Jetson Nano with Jetpack 4.5, but no matter the download link I use I end up with “Could not find a version that satisfies the requirement tensorflow (from versions: none)”

root@nano:~/tensorflow_wheel# sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v45 tensorflow
Looking in indexes: https://pypi.org/simple, https://developer.download.nvidia.com/compute/redist/jp/v45
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
WARNING: You are using pip version 20.1; however, version 21.0.1 is available.
You should consider upgrading via the ‘/usr/local/bin/python3.8 -m pip install --upgrade pip’ command.
root@nano:~/tensorflow_wheel# sudo python3.8 -m pip install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v45 tensorflow
Looking in indexes: https://pypi.org/simple, https://developer.download.nvidia.com/compute/redist/jp/v45
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

Even when installing from the wheels directly I find terrors, here is an example from one of many wheels I have tried:

root@nano:~/tensorflow_wheel# python3.8 -m pip install tensorflow_gpu-1.13.1+nv19.3-cp36-cp36m-linux_aarch64.whl
ERROR: tensorflow_gpu-1.13.1+nv19.3-cp36-cp36m-linux_aarch64.whl is not a supported wheel on this platform.

Any recommendation how to work around this? I have tried multiple versions of Pip, latest and 20.1.

How do you run tensorflow? I’ve installed but don’t know how to run it. This shows after I install:

sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
[sudo] password for pc1:

Sorry, try again.
[sudo] password for pc1:
Sorry, try again.
[sudo] password for pc1:
Reading package lists… Done
Building dependency tree
Reading state information… Done
liblapack-dev is already the newest version (3.7.1-4ubuntu1).
gfortran is already the newest version (4:7.4.0-1ubuntu2.3).
libblas-dev is already the newest version (3.7.1-4ubuntu1).
libhdf5-dev is already the newest version (1.10.0-patch1+docs-4).
zip is already the newest version (3.0-11build1).
libhdf5-serial-dev is already the newest version (1.10.0-patch1+docs-4).
hdf5-tools is already the newest version (1.10.0-patch1+docs-4).
libjpeg8-dev is already the newest version (8c-2ubuntu8).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2).
The following packages were automatically installed and are no longer required:
apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin
dpkg-repack gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common
kde-window-manager kinit kio kpackagetool5 kwayland-data kwin-common
kwin-data kwin-x11 libdebian-installer4 libkdecorations2-5v5
libkdecorations2private5v5 libkf5activities5 libkf5attica5
libkf5completion-data libkf5completion5 libkf5declarative-data
libkf5declarative5 libkf5doctools5 libkf5globalaccel-data libkf5globalaccel5
libkf5globalaccelprivate5 libkf5idletime5 libkf5jobwidgets-data
libkf5jobwidgets5 libkf5kcmutils-data libkf5kcmutils5 libkf5kiocore5
libkf5kiontlm5 libkf5kiowidgets5 libkf5newstuff-data libkf5newstuff5
libkf5newstuffcore5 libkf5package-data libkf5package5 libkf5plasma5
libkf5quickaddons5 libkf5solid5 libkf5solid5-data libkf5sonnet5-data
libkf5sonnetcore5 libkf5sonnetui5 libkf5textwidgets-data libkf5textwidgets5
libkf5waylandclient5 libkf5waylandserver5 libkf5xmlgui-bin libkf5xmlgui-data
libkf5xmlgui5 libkscreenlocker5 libkwin4-effect-builtins1 libkwineffects11
libkwinglutils11 libkwinxrenderutils11 libllvm9 libqgsttools-p1
libqt5designer5 libqt5help5 libqt5multimedia5 libqt5multimedia5-plugins
libqt5multimediaquick-p5 libqt5multimediawidgets5 libqt5opengl5
libqt5quickwidgets5 libqt5sql5 libqt5test5 libxcb-composite0 libxcb-cursor0
libxcb-damage0 os-prober python3-dbus.mainloop.pyqt5 python3-icu python3-pam
python3-pyqt5 python3-pyqt5.qtsvg python3-pyqt5.qtwebkit python3-sip
qml-module-org-kde-kquickcontrolsaddons qml-module-qtmultimedia
qml-module-qtquick2 rdate tasksel tasksel-data
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

File “/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py”, line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://developer.download.nvidia.com/compute/redist/jp/v45/flatbuffers/

I tried the above but I am getting this error repeatedly if anyone with the same outcome managed to get it installed

Python 3.8 is not supported officially. In order to use the pre-built version you must use Python 3.6.

Cannot install ubuntu 20 required to run tensorflow. please help thanks.