擅长:python、mysql、java
<p><a href="https://www.pygame.org/docs/ref/camera.html" rel="nofollow noreferrer">From the pygame documentaion</a></p>
<pre><code>Pygame currently supports only Linux and v4l2 cameras.
EXPERIMENTAL!: This API may change or disappear in later pygame releases. If you use this, your code will very likely break with the next pygame release.
</code></pre>
<p>你在windows机器上吗?在</p>
<p>您可能想检查一下前面关于windows上的pygame的答案-<a href="https://stackoverflow.com/questions/16266244/python-pygame-camera-init-no-vidcapture">python pygame.camera.init() NO vidcapture</a></p>