import _camera 出错
pygame吧
全部回复
仅看楼主
level 1
1楼祭度娘[不高兴]
2017年03月05日 08点03分 1
level 1
import pygame
import pygame.camera
from pygame.locals import *
pygame.init()
pygame.camera.init()
cam = pygame.camera.Camera("/dev/video0",(640,480))
cam.start()
image = cam.get_image()
这段代码的pygame官网上复制来的,但是编译会出错:
Traceback (most recent call last):
File "C:\Users\DENG\Desktop\pygame_Test\Cam.py", line 6, in <module>
pygame.camera.init()
File "D:\Program Files (x86)\Python\Python36-32\lib\site-packages\pygame\camera.py", line 42, in init
from pygame import _camera
ImportError: cannot import name '_camera'
无法导入 _camera[不高兴]
------------------------win7,python3.6----------------
2017年03月05日 08点03分 2
level 1
人工置顶
2017年03月05日 13点03分 3
level 1

2017年03月06日 03点03分 4
level 1

2017年03月06日 06点03分 5
level 1
我也遇到这问题,求解
2018年04月15日 11点04分 6
level 9
2018年04月16日 00点04分 7
level 1
怎么解决?
2018年06月21日 05点06分 8
level 1
楼主怎么解决的?
2018年08月10日 07点08分 9
level 1
问题解决啦,参考这篇文章:jangel.site/?p=62
主要是他们官方修改名字了
2018年12月22日 01点12分 10
1