The missing tensorboard URL issue looks to be the result of the pip 9 bug we found earlier. If you follow our current setup instructions exactly (or otherwise ensure pip is properly upgraded to version 19) the problem should be resolved:
https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html
Thanks! Following the instructions from that link does solve mine case.
Does this also work with 4.2.1? I get this on step 2 (after installing jetpack) of the instructions above…
r@r-desktop:~$ $sudo apt-get install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
I thought sudo would take care of the permissions problem?
All apt-get install operations require sudo. If you are running JetPack/SDKM, then it asks for the password for that reason. However, obtaining a lock might indicate also that there is already an apt-get operation going on. For example, when you first boot Jetson after flashing, then there will be hundreds of Ubuntu packages wanting update and you might not be able to actually add JetPack packages until that completes. Let it run for an hour or two before trying again.
Alternately, you can disable automatic package update (and then enable it again when done if you wish). In “/etc/apt/apt.conf.d/20auto-upgrades”, edit to change unattended upgrade from “1” to “0”:
APT::Periodic::Unattended-Upgrade "0";
I follow the instruction to install tensorflow on Xavier, and didnt have anything got wrong while installing.
“Python 2.7+JetPack4.1.1”
pip install --extra-index-url Index of /compute/redist/jp/v411 tensorflow-gpu==1.13.0rc0+nv19.2 --user
nvidia@jetson-0423518031910:~$ sudo pip install --extra-index-url Index of /compute/redist/jp/v411 tensorflow-gpu==1.13.0rc0+nv19.2 --user
[sudo] password for nvidia:
WARNING: The directory ‘/home/nvidia/.cache/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
WARNING: The directory ‘/home/nvidia/.cache/pip’ or its parent directory is not owned by the current user and caching wheels 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: Simple index, Index of /compute/redist/jp/v411
Requirement already satisfied: tensorflow-gpu==1.13.0rc0+nv19.2 in ./.local/lib/python3.6/site-packages (1.13.0rc0+nv19.2)
Requirement already satisfied: absl-py>=0.1.6 in ./.local/lib/python3.6/site-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (0.7.1)
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (1.17.0)
Requirement already satisfied: protobuf>=3.6.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (3.9.1)
Requirement already satisfied: tensorflow-estimator>=1.13rc0 in ./.local/lib/python3.6/site-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (1.14.0)
Requirement already satisfied: keras-preprocessing>=1.0.5 in ./.local/lib/python3.6/site-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (1.1.0)
Requirement already satisfied: wheel>=0.26 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (0.33.4)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (1.12.0)
Requirement already satisfied: keras-applications>=1.0.6 in ./.local/lib/python3.6/site-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (1.0.8)
Requirement already satisfied: astor>=0.6.0 in ./.local/lib/python3.6/site-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (0.8.0)
Requirement already satisfied: gast>=0.2.0 in ./.local/lib/python3.6/site-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (0.2.2)
Requirement already satisfied: grpcio>=1.8.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (1.23.0)
Requirement already satisfied: tensorboard<1.13.0,>=1.12.0 in ./.local/lib/python3.6/site-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (1.12.2)
Requirement already satisfied: termcolor>=1.1.0 in ./.local/lib/python3.6/site-packages (from tensorflow-gpu==1.13.0rc0+nv19.2) (1.1.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from protobuf>=3.6.1->tensorflow-gpu==1.13.0rc0+nv19.2) (39.0.1)
Requirement already satisfied: h5py in ./.local/lib/python3.6/site-packages (from keras-applications>=1.0.6->tensorflow-gpu==1.13.0rc0+nv19.2) (2.9.0)
Requirement already satisfied: werkzeug>=0.11.10 in ./.local/lib/python3.6/site-packages (from tensorboard<1.13.0,>=1.12.0->tensorflow-gpu==1.13.0rc0+nv19.2) (0.15.5)
Requirement already satisfied: markdown>=2.6.8 in ./.local/lib/python3.6/site-packages (from tensorboard<1.13.0,>=1.12.0->tensorflow-gpu==1.13.0rc0+nv19.2) (3.1.1)
but when I testing, I got this error.
nvidia@jetson-0423518031910:~$ python
Python 2.7.15+ (default, Nov 27 2018, 23:36:35)
[GCC 7.3.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import tensorflow
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named tensorflow
I can’t figure out why.
(either on python3 with pip3 install)
Hi everyone,
Question:
For the configuration “Python 3.6+JetPack4.2” is there any way it can be turned into: “Python 2.7+JetPack4.2” ? I mean, is there the possibility to install the tensorflow-gpu for jetpack 4.2 but with Python2?
Situation:
Up until now, we had a TX2 with Jetpack3 and all the system compatible with Python2 (we are using ROS).
To perform some upgrades on the system, we decided to change the TX2 by a Xavier and we took the last release of Jetpack at the moment (4.2).
We know that Python2 EOL is around the corner, but until ROS supports Python3, we’d like to keep running everything in Python2 because, every now and then, compatibility issues kept appearing and the only restrain is tensorflow-gpu.
What would be your recommendation?
Thanks in advanced!
@dllevat I think many people want this but it’s not happening, not in what Nvidia officially released and supports anyways. This is why I still keep 4.1.1.
It’s also possible to run ROS with Python3. For the same Python2 EOL issue, I also have problem with some hardware libraries are no longer supporting Python2. So I have been adapting a hybrid by making a few nodes running in Python3 along with the old Python2 nodes.
@anguyen3 Thanks for your answer! I knew it was a long shot.
I’ve been doing kind of the same, but there’s a lot of lost time tracking down incompatibilities and fixings.
The idea was to wait until may 2020 for the theoretical release of ROS Neotic which will officially support Python3. But until then, I’d like to avoid doing mixings with ros.
Has anyone successfully used the TensorFlow Object Detection API with the Python3.6 version of TensorFlow for Jetson AGX Xavier? tubemate or mobdro ?
FYI: In the instructions regarding the dependencies you have specified
keras_preprocessing==1.0.5, but I receive the following error:
ERROR: tensorflow 2.1.0+nv20.4 has requirement keras-preprocessing>=1.1.0, but you'll have keras-preprocessing 1.0.5 which is incompatible.
The TensorFlow behavior on my Jetson Xavier is unpredictable. I am running Jetpack 4.4 and installed TensorFlow 2.1.0+nv20.4 as described here. I then wanted to run my model on it, but faced multiple strange errors. One I have asked about on StackOverflow already (here). Another one is: Instead of getting an EagerTensor the same function on the Xavier returns a Tensor-type.
On my main PC I am using TensorFlow 2.1 and there I am not facing any problems. Any advice would be appreciated.
python3 tensorflow2.1+20.4 jetpack4.4
import tensorflow as tf
2020-05-12 16:13:47.706899: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.2
2020-05-12 16:13:50.404420: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libnvinfer.so.7
2020-05-12 16:13:50.406626: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libnvinfer_plugin.so.7
print(tf.version)
Traceback (most recent call last):
File “”, line 1, in
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’
I had to downgrade to Jetpack 4.3 and TensorFlow 2.0. With this setup the code runs as on the main PC.
Three thoughts about the possible reasons why it failed with Jetpack 4.4. and Tensorflow 2.1.0+nv20.4:
- Prerequisites and dependencies are missing or have the wrong version (I followed the official instruction and noticed a mistake there already. Please see my previous post here).
- The version mentioned above is not created correctly.
- There is something that I have not considered when I brought the code from the main PC to the Jetson Xavier (nstalled jetpack->installed prerequisites of TF->installed TF->cloned my repository->executed the code).
I read in another thread that Nvidia compiled tf 2.1.0 with --config=v1, causing all these issues.
I am also facing some strange errors in tensorflow 2.1.0+nv20.4 with Jetpack 4.4, and if as you @leonard.schneider have said, these errors are due to an incorrect compilation, how could be this corrected? Should we wait until NVIDIA compiles the tf 2.1.0 correctly, or is there any kind of tutorial in order to build it correctly?
P.D: you also said you’ve read in another thread that the reason is the incorrect compilation, could you cite that other thread, please?
Are there no plans to release versions for Python 2.7 for JetPack 4.2 onwards (4.4 specifically)?
Am I correct that the consensus here is that Tensorflow 2.x doesn’t work on the Jetson NX SD image version of the OS?
This is the forum for the Jetson AGX Xavier, and I do not know whether the TF 2.x works on the NX, but I am deeply disappointed there has not been any answer from NVIDIA about the Jetpack 4.4 DP TF 2.1 problem.
I would say that there is consensus about the incorrect build of that version, and in my case I cannot continue with my project without correcting that error.
Could someone please check that in that version the TF 2.x behaviour is not correct? For example, whenever I’m trying to use Keras2ONNX, the output says that TF has no attribute '__version__'.
I would be really thankful if someone could check and tell me which steps are needed to correct this.
Sorry I’m sort of in the wrong forum, but this looked like a noisy enough forum to get noticed. My ultimate goal is to run TF on my NX; the site and documents I can find claim it should work, but I can’t get that far. SDKManager can’t connect to my machine and the SD image has a screwed up CUDA installation. Hard to develop things when the critical tools are broken.