Raspberry Pi V2 camera not recognized when using hello_camera

hello - I am following the [Getting Started with AI on Jetson Nano] course, and have installed a raspberry pi camera version 2, on one of the designated ports (not sure which one should be used).

When trying to create the camera object in csi_camera.ipynb, I get an error:

RuntimeError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/csi_camera.py in 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)
1 from jetcam.csi_camera import CSICamera
----> 3 camera = CSICamera(width=224, height=224)

/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/csi_camera.py in init(self, *args, **kwargs)
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.

I have no clue how to install other libraries yet, and where to do it; seeing as im a novice.
Would appreciate help solving this issue so I can continue with the course

many thanks

I face the same issue as well and haven’t found a solution. I’ve done some testing, and the following can be confirmed:

  1. It shouldn’t be the problem of Raspberry Pi camera itself, as the program from JacksonHacksNano (https://github.com/JetsonHacksNano/CSI-Camera) works perfectly fine.

  2. It shouldn’t be the problem of the jetcam library itself. I installed the jetcam library from its repository (https://github.com/NVIDIA-AI-IOT/jetcam) in a separate Python virtual environment (which is unrelated to the docker image) and it also works perfectly fine.

So I guess it’s the problem of the docker image itself. Hopefully someone can come up with a solution as I really can’t continue with the course.