Fresh JetPack 4.5 and 4.5.1 cannot work with MIPI CSI camera

Download the sdkmanager to install it.

https://docs.nvidia.com/sdk-manager/install-with-sdkm-jetson/index.html

Hi,
It’s my first time to install and use SDK Manager. Not easy. I need to find a laptop, install Ubuntu Desktop, download and install SDK Manager, flash Xavier NX. All these took me very long time.
I installed SDK Manager and flased Xavier NX with JetPack 5.0.1. Actually I wanted to use JetPack4.5, but this option is not available. I can only select either 5.0.0 or 5.0.1. So I installed the latest version JetPack 5.0.1. The installations of components are all successful except the flash of Jetson Xavier NX which shows Skipped.
I checked JetPack version on Xavier NX. Below is the log:

$ sudo apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Version: 5.0.1-b118
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 5.0.1-b118), nvidia-opencv (= 5.0.1-b118), nvidia-cudnn8 (= 5.0.1-b118), nvidia-tensorrt (= 5.0.1-b118), nvidia-container (= 5.0.1-b118), nvidia-vpi (= 5.0.1-b118), nvidia-nsight-sys (= 5.0.1-b118), nvidia-l4t-jetson-multimedia-api (>> 34.1-0), nvidia-l4t-jetson-multimedia-api (<< 34.2-0)
Homepage: Autonomous Machines | NVIDIA Developer
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_5.0.1-b118_arm64.deb
Size: 29376
SHA256: d7ff0e4a95cc11c7a5d0b9e347923e8233ab544431d5db49d18c24944902e7a2
SHA1: fcab6ba9d6dca4a8b3e758d6fb1584baed34f7ed
MD5sum: f168d009bf5e3ee36ab14e646ad4b7dc
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

But when I tested MIPI CSI camera, it returned this error:
$ gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink
WARNING: erroneous pipeline: no element “nvoverlaysink”
So I can not use the camera.

Very bad experiences with JetPack since version 4.6.0 in recent months. Previously I used JetPack 4.4 and 4.5 without any problems for many installations on Jetson Nano and Xavier NX. But since the release of 4.6.0 and 4.6.1, the OpenCV cannot work after I build my program to executable by Pyinstaller. It always gave me this error message “ImportError: ERROR: recursion is detected during loading of “cv2” binary extensions. Check OpenCV installation” for the freshly flashed Xavier NX, but it works fine without compilation! So I have to use archive of 4.5.1. Even now I cannot use 4.5.1! Why Nvidia Jetson becomes worse and worse?

There’s should have and checkbox to show the older version.

Hi,
No, only v5.0 and v5.0.1 are available for selection. All other old versions are disabled for selection. Please refer to below photo for reference:

Hi,
JetPack 4.6.2 is the r32.7.2

Hi,
I also want to install jetpack 4.5.1 or 4.6.2, but the problem is that SDK Manager does not allow me to choose it because all other versions (below 5.0) are greyed out so I cannot select. You can refer to above photo which shows only 5.0 and 5.0.1 are allowed for choosing.


screenshot. Clearer. Only 5.0 and 5.0.1 are available for choosing.

Hi cydu,

The JetPack-4.6.2 available on ubuntu-16.04 and ubuntu-18.04.
Please run SDK Manager on above host machine.

My host machine is Ubuntu 20.04.4. If Jetpack 4.6.2 installation needs 18.04, I can downgrade it and try again. But according to my previous experience, there is problem with opencv when building executable with pyinstaller on Jetpack 4.6.2. If same problem again, what should we do?

Hi cydu,

Suggest you can downgrade your host machine to Ubuntu-18.04.
Then you can install JetPack-4.6.2 and JetPack-5.0.1.

Or you can use docker to install JetPack. (Docker install support Ubuntu-20.04)
Detail reference: Docker Images :: NVIDIA SDK Manager Documentation

Hi,
I successfully installed Jetpack 4.6.2 on Xavier NX. The CSI cameras can now work properly. I also checked OpenCV version, it is 4.1.1. But there is the same problem when building exe with Pyinstaller (version 4.7).
I created a very simple python file “testCV2.py” just for test. The file is shown below:

import cv2

print(cv2.version)

then built it to executable by Pyinstaller. But when i ran the exe., I saw such error message:
Traceback (most recent call last):
File “testCV2.py”, line 1, in
File “PyInstaller/loader/pyimod03_importers.py”, line 476, in exec_module
File “cv2/init.py”, line 89, in
File “cv2/init.py”, line 79, in bootstrap
File “PyInstaller/loader/pyimod03_importers.py”, line 476, in exec_module
File “cv2/init.py”, line 89, in
File “cv2/init.py”, line 23, in bootstrap
ImportError: ERROR: recursion is detected during loading of “cv2” binary extensions. Check OpenCV installation.
[10744] Failed to execute script ‘testCV2’ due to unhandled exception!

I double checked the installation of Jetpack, and below is the output:
$ sudo apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Version: 4.6.2-b5
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 4.6.2-b5), nvidia-opencv (= 4.6.2-b5), nvidia-cudnn8 (= 4.6.2-b5), nvidia-tensorrt (= 4.6.2-b5), nvidia-visionworks (= 4.6.2-b5), nvidia-container (= 4.6.2-b5), nvidia-vpi (= 4.6.2-b5), nvidia-l4t-jetson-multimedia-api (>> 32.7-0), nvidia-l4t-jetson-multimedia-api (<< 32.8-0)
Homepage: Autonomous Machines | NVIDIA Developer
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.6.2-b5_arm64.deb
Size: 29358
SHA256: 3b173ce179df79348fc68254a1fa4b7c9fc1d65ff2a065de7bf70459223ac39f
SHA1: eb5f9357dffa31c6945b39d6d28f7ef31b10fda2
MD5sum: 93001822fdf68db3a47cc832a17cbce8
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Package: nvidia-jetpack
Version: 4.6.1-b110
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 4.6.1-b110), nvidia-opencv (= 4.6.1-b110), nvidia-cudnn8 (= 4.6.1-b110), nvidia-tensorrt (= 4.6.1-b110), nvidia-visionworks (= 4.6.1-b110), nvidia-container (= 4.6.1-b110), nvidia-vpi (= 4.6.1-b110), nvidia-l4t-jetson-multimedia-api (>> 32.7-0), nvidia-l4t-jetson-multimedia-api (<< 32.8-0)
Homepage: Autonomous Machines | NVIDIA Developer
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.6.1-b110_arm64.deb
Size: 29374
SHA256: 312e75d89d0837472668714c43590fd204a33b9c7727c542e1b5df367ec239c4
SHA1: 769cbf1c7acb9e39a4539879884a570bde12292c
MD5sum: a074f5225dfe8d7ea24560b15eef08d9
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

It looks like there are 2 versions of Jetpack: Version: 4.6.2-b5 and Version: 4.6.1-b110. Why?

And how to solve the openCV exe-building problem?

When I copy and paste the code of “testCV2.py”, the display on this website is somewhat wrong. It should look like this:

import cv2

print("cv2.__ version__ ")

Hi,
I also tried to install Jetpack 4.5.1 on another SD card. But same problem with OpenCV as Jetpack 4.6.2.

Hi,
Any solution?

Sorry I don’t have idea for this error.
Maybe googling “ImportError: ERROR: recursion is detected during loading of “cv2” binary extensions. Check OpenCV installation.” to figure the solution.

Hi,

We got a similar PyInstaller issue before.
Could you check the WAR in the below document first?

https://elinux.org/Jetson/L4T/TRT_Customized_Example#PyInstaller_with_OpenCV

Thanks.