running
ls -ltrh /dev/video*
gives the output
crw-rw---- 1 root video 81, 0 Dec 6 06:49 /dev/video0
, so I think system sees the camera, but I get an error `---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import cv2
2 cam = cv2.VideoCapture(0)
3 ret, frame = cam.read()
File /usr/local/lib/python3.10/dist-packages/cv2/init .py:181
176 if DEBUG: print(“Extra Python code for”, submodule, “is loaded”)
178 if DEBUG: print(‘OpenCV loader: DONE’)
→ 181 bootstrap()
File /usr/local/lib/python3.10/dist-packages/cv2/init .py:153, in bootstrap()
149 if DEBUG: print(“Relink everything from native cv2 module to cv2 package”)
151 py_module = sys.modules.pop(“cv2”)
→ 153 native_module = importlib.import_module(“cv2”)
155 sys.modules[“cv2”] = py_module
156 setattr(py_module, “_native”, native_module)
File /usr/lib/python3.10/importlib/init .py:126, in import_module(name, package)
124 break
125 level += 1
→ 126 return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libnvrm.so: cannot open shared object file: No such file or directory`
I need some help, I’ve never asked any questions on any forums before, so if more information is needed, please ask me.
Hi,
Please follow the guidance to check if the camera can be successfully launched:
Jetson Nano FAQ
Q: I have a USB camera. How can I launch it on Jetson Nano?
If yes, please apply the same pipeline to the python sample:
V4l2src using OpenCV Gstreamer is not working in Jetson Xavier NX - #3 by DaneLLL
1 Like
I managed to start the camera using the guidance, but in the Python code, using the linked code in the pipeline, I got this error
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[6], line 2
1 import sys
----> 2 import cv2
4 def read_cam():
5 cap = cv2.VideoCapture("v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480 ! videoconvert ! video/x-raw,format=BGR ! appsink")
ImportError: libnvrm.so: cannot open shared object file: No such file or directory
what should I do now?
Hi,
Please share which Jetpack release you are using. It is supposed to work if you use the OpenCV package installed through SDKManager.
Software part of jetson-stats 4.2.3 - (c) 2023, Raffaello Bonghi
Model: NVIDIA Jetson Nano Developer Kit - Jetpack 4.6.1 [L4T 32.7.1]
NV Power Mode[0]: MAXN
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
- P-Number: p3448-0000
- Module: NVIDIA Jetson Nano (4 GB ram)
Platform:
- Distribution: Ubuntu 18.04 Bionic Beaver
- Release: 4.9.253-tegra
jtop:
- Version: 4.2.3
- Service: Inactive
Libraries:
- CUDA: 10.2.300
- cuDNN: 8.2.1.32
- TensorRT: 8.2.1.8
- VPI: 1.2.3
- Vulkan: 1.2.70
- OpenCV: 4.1.1 - with CUDA: NO
Hi,
You may try to run the sample through python 2.7 instead of 3.10. See if it works with old python version.
how can I do that, from kernel selections, no other choice apart from python3 is available.
DaneLLL
December 10, 2024, 1:07am
9
Hi,
You can run
$ python2 --version
If it is installed, you can then use python2 to launch the sample for a try. See if it works.
no, unfortunately, it is not
DaneLLL
December 10, 2024, 4:48am
11
Hi,
Your system seems to be in unknown status. Would suggest re-flash the developer kit through SDKManager. It should be running fine on a clean system.