0

I am trying to use a camera in windows. I ve installed python with anaconda. tried installing pygame with conda but did not work so installed with pip. Following the advice in open camera with pygame I tried to open the camera but I got an error.

When executing pygame.camera.init() the system complains that can not import name _camera .

Indeed when reading camera.py there is the line from pygame import _camera and this is where it fails. It can not import _camera

I am at lost at what to do. Any help very much appreciated

EDIT1:

I have been told that this works in linux only. :( So going to the title question: How to use the camera with python in windows? (or mac?)

Community
  • 1
  • 1
KansaiRobot
  • 7,564
  • 11
  • 71
  • 150

1 Answers1

0

PyGame Doc: camera

Pygame currently supports only Linux and v4l2 cameras.

It means it works only with Linux.

furas
  • 134,197
  • 12
  • 106
  • 148
  • Thanks!. Does this mean that it does not work on a mac either? and Is there a way to use the camera with python for linux? – KansaiRobot Jan 18 '17 at 00:19
  • try [OpenCV](http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_tutorials.html) and [Getting Started with Videos](http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_gui/py_video_display/py_video_display.html#display-video) – furas Jan 18 '17 at 06:15