0

I was not planning to post this on the forum but at the moment i dont see any other solution. I have installed fresh pycharm and python 3.9 on my new windows box. At the time i must settle with windows but it will be changed in the near future to linux.

Anyhow, i try to run this simple code but i got error regarding collections, so i followed one thread on this forum and i solve this. After that i got stuck with the error from the subject and it looks like nothing helps.

I have try to downgrade and to upgrade python ( am currently using 3.10 ) i reinstalled pycharm and recheck the setting, try with docker but nothing has changed. In the future i would like to reuse one old code that we have used for openCV project so this is just basic setup step. I saw bunch of solutions but non of them addresses pyudev lib so i dont know what exactly do i need to import/change. CODE:

`

import collections.abc
import pyudev

def find_usb_camera():
context = pyudev.Context()
for device in context.list_devices(subsystem='video4linux'):
    if 'usb' in device.get('ID_BUS'):
        print(f"USB cam port: {device.device_node}")

find_usb_camera()

`

Any ideas how to solve this ?

Arnix
  • 1
  • 2

0 Answers0