I have camera set up, which works fine. The thing is, there is an ModuleNotFoundError when I am trying to import pygame. (Note:I am using windows)
This is a test project, and I have to make a camera out of pygame. I've tried some youtube tutorials and I messed with pygame but it always causes an Error.
This is what I have so far:
import pygame.camera
pygame.camera.init()
camera = pygame.camera.list_cameras()[0]
pyg = pygame.camera.Camera(camera (640, 480), 'HSV')
--snip--
if pyg.query_image():
win.blit(pyg.get_image(surface=win), (0, 0))
pygame.quit()
I resulted in the same error every time I tried. The Error message is:
Traceback (most recent call last):
File "C:\Users\roche\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pygame\_camera_vidcapture.py", line 31, in init
import vidcap as vc
ModuleNotFoundError: No module named 'vidcap'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\roche\Documents\pygame_camera.py", line 5, in <module>
pygame.camera.init()
File "C:\Users\roche\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pygame\camera.py", line 68, in init
_camera_vidcapture.init()
File "C:\Users\roche\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pygame\_camera_vidcapture.py", line 33, in init
from VideoCapture import vidcap as vc
ModuleNotFoundError: No module named 'VideoCapture'
Any Advice?