CSI-Camera icon indicating copy to clipboard operation
CSI-Camera copied to clipboard

There is a problem that it cannot run in python3.

Open Choikyungho9 opened this issue 3 years ago • 4 comments

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.

Choikyungho9 avatar May 31 '21 13:05 Choikyungho9

@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

jaysojitrak avatar Mar 01 '22 04:03 jaysojitrak

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

JetsonHacksNano avatar Mar 01 '22 05:03 JetsonHacksNano

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

jaysojitrak avatar Mar 01 '22 14:03 jaysojitrak

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?

thanhhoangvan avatar Mar 30 '22 14:03 thanhhoangvan