Jetson nano ubuntu upgrade

I want to use python3.8
So I upgrade my jetson nano ubuntu from 18.04 to 20.04
the code which I can run successfully in 18.04 have error in 20.04
How can I solve these problems? Thanks a lot
I had check there is no problem in hardware device

code:
from jetcam.csi_camera import CSICamera
camera = CSICamera(width=640, height=480)
image = camera.read()

error:
RuntimeError Traceback (most recent call last)
File /usr/local/lib/python3.8/dist-packages/jetcam-0.0.0-py3.8.egg/jetcam/csi_camera.py:24, in CSICamera.init(self, *args, **kwargs)
23 if not re:
—> 24 raise RuntimeError(‘Could not read image from camera.’)
25 except:

RuntimeError: Could not read image from camera.

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)
Cell In[2], line 2
1 from jetcam.csi_camera import CSICamera
----> 2 camera = CSICamera(width=640, height=480)
3 image = camera.read()

File /usr/local/lib/python3.8/dist-packages/jetcam-0.0.0-py3.8.egg/jetcam/csi_camera.py:26, in CSICamera.init(self, *args, **kwargs)
24 raise RuntimeError(‘Could not read image from camera.’)
25 except:
—> 26 raise RuntimeError(
27 ‘Could not initialize camera. Please see error trace.’)
29 atexit.register(self.cap.release)

RuntimeError: Could not initialize camera. Please see error trace.

Hi,

Jetson uses L4T rather than Ubuntu.
It looks like the upgrade breaks the CSI camera functionality.

Maybe you can try r32.7 (JetPack 4.6.3) with Python 3.7.

Thanks.

Thanks for your reply
My jetson nano can work with this command in terminal

$ gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink

I don’t know why this code can’t work now
Are they using the different CSI camera libraries
I had reinstall the jetcam libraries in my jetson nano
but the result still the same
code:
from jetcam.csi_camera import CSICamera
camera = CSICamera(width=640, height=480)
image = camera.read()

So I need to reinstall the ubuntu 18.04 to solve?
I don’t know how to change to r32.7 (JetPack 4.6.3) with Python 3.7
The reason that I need to use python 3.8 is because I need to use pca9685 libraries(which need python 3.8 to use) in my project

Hi

Do you mean the GStreamer command can work on the custom Ubuntu 20.04?

We do have some user that uses a custom Python version on r32.7.
So it looks workable to us but you will need to make sure all the dependencies also support the custom Python version as well.

You can install Python 3.9 with the following command:

$ sudo apt install python3.9

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.