Open Em-Lopez opened 6 years ago
So I cd'd into the directory and it lets me import v4l2 as _v4l2
without any issues, but import pyfakewebcam.v4l2 as _v4l2
is like a sin and evil. Why won't this work.
Ok I solved it in pyfakewebcam.py import pyfakewebcam.v4l2 as _v4l2
-> from pyfakewebcam import v4l2 as _v4l2
I'll try to take a look into the issue you guys are having this weekend. I'll push out updates if necessary!
An import problem still appears:
>>> import pyfakewebcam
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyfakewebcam/__init__.py", line 3, in <module>
from pyfakewebcam.pyfakewebcam import FakeWebcam
File "pyfakewebcam/pyfakewebcam.py", line 8, in <module>
import pyfakewebcam.v4l2 as _v4l2
ImportError: No module named v4l2
Can you offer a quick fix? Got confused with the name masking of the modules pyfakewebcam and v4l2
This happens with python2. @serbuh
To solve that, import this at the beginning of the __init__.py
and pyfakewebcam.py
:
from __future__ import absolute_import
I solved copy pyfakewebcam.py and v4l2.py to my program directory.And change import pyfakewebcam.v4l2 as _v4l2
-> import v4l2 as _v4l2
in pyfakewebcam.py
File "build/bdist.linux-x86_64/egg/pyfakewebcam/init.py", line 3, in
ImportError: No module named v4l2
File "build/bdist.linux-x86_64/egg/pyfakewebcam/pyfakewebcam.py", line 8, in