Hi, for pictures I tried…
from time import sleep from picamera import PiCamera
camera
= PiCamera() camera.resolution = (1024, 768) camera.start_preview()
sleep
(2) camera.capture('test_photo.jpg')
and for videos…
import picamera
camera
= picamera.PiCamera()
camera
.resolution = (640, 480) camera.start_recording('test_video.h264') camera.wait_recording(5) camera.stop_recording()
print('Finished recording')
but both give me the same error, but on different line numbers.
For Photos I get,
Traceback (most recent call last):
File “take_photo.py”, line 6, in <module>
from picamera import PiCamera
ImportError: No module named ‘picamera’
and for videos I get,
Traceback (most recent call last):
File “take_video.py”, line 3, in <module>
import picamera
ImportError: No module named ‘picamera’
I have a headless system, just in case this only work with a monitor attached to the Pi.