JetsonHacksNano / CSI-Camera

Simple example of using a CSI-Camera (like the Raspberry Pi Version 2 camera) with the NVIDIA Jetson Developer Kit
Other
817 stars 287 forks source link

There is a problem that it cannot run in python3. #44

Open Choikyungho9 opened 3 years ago

Choikyungho9 commented 3 years ago

python simple_test.py works fine when I run it as terminal on jetpack 4.4.

But python3 simple_test.py in terminal doesn't work.

The error 'Unable to open camera' is displayed.

Please let me know what the problem is. Why does it only work with Python 2 version?

I need to use python 3.6.9 version / opencv 4.5.1.

jaysojitrak commented 2 years ago

@Choikyungho9 @jetsonhacks hello there,

Have you solved your problem or not please let me know if you solved it. it will be nice if you explain how you solved it.

thanks in advance

peace

JetsonHacksNano commented 2 years ago

Which version are you running? I've been unable to recreate this.

jaysojitrak commented 2 years ago

thanks for replying but I have solved it.

there are issues with OpenCV. in python3 I have installed the OpenCV - 4.4.5 and in python2 I have been using the pre-installed OpenCV - 4.1.1 in jetson nano os so it is working well with python2 but can not able to open the pipeline by using OpenCV-4.4.5.

So I was checking the OpenCV versions and found the solution. then just simply removed the OpenCV-4.5.5 from python3. and now working very well.

I have never doubted the @jetsonhacks codes It always runs in like one attempt. no west of time. my bad🤗

--

thanks and regards jay sojitra

thanhhoangvan commented 2 years ago

I rebuilt OpenCV-python with CUDA support with version 4.5.5. However, only python2 can run and python3 can't. Is that version difference the main problem?