Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I keep getting this error, whether from source #3

Open
Em-Lopez opened this issue Oct 28, 2018 · 6 comments
Open

I keep getting this error, whether from source #3

Em-Lopez opened this issue Oct 28, 2018 · 6 comments

Comments

@Em-Lopez
Copy link

File "build/bdist.linux-x86_64/egg/pyfakewebcam/init.py", line 3, in
File "build/bdist.linux-x86_64/egg/pyfakewebcam/pyfakewebcam.py", line 8, in
ImportError: No module named v4l2

@Em-Lopez
Copy link
Author

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.

@Em-Lopez
Copy link
Author

Ok I solved it in pyfakewebcam.py import pyfakewebcam.v4l2 as _v4l2 -> from pyfakewebcam import v4l2 as _v4l2

@jremmons
Copy link
Owner

jremmons commented Nov 1, 2018

I'll try to take a look into the issue you guys are having this weekend. I'll push out updates if necessary!

@serbuh
Copy link

serbuh commented Jan 4, 2020

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

@charlielito
Copy link

charlielito commented Jun 22, 2020

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

@hoshianaaa
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@jremmons @charlielito @serbuh @Em-Lopez @hoshianaaa and others