tortoise
Posts: 2
Joined: Fri Jan 23, 2015 3:14 pm

python code errorHi

Thu Oct 29, 2015 3:33 pm

Hi I am trying to operate a pi camera controld by a PIR unit the problem is python tells me
Picamera is not a module, can anybody help thanks

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: python code errorHi

Thu Oct 29, 2015 3:46 pm

Have you installed the python-picamera library?

https://www.raspberrypi.org/documentati ... /README.md

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: python code errorHi

Thu Oct 29, 2015 3:50 pm

picamera <> Picamera.

Also
python-picamera <> python3-picamera

Code: Select all

pi@apollo:~$ python3
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import picamera
>>> dir(picamera)
['Blue', 'CircularIO', 'Color', 'Green', 'Hue', 'Lightness', 'PiCamera', 'PiCameraAlreadyRecording', 'PiCameraCircularIO', 'PiCameraClosed', 'PiCameraError', 'PiCameraMMALError', 'PiCameraNotRecording', 'PiCameraRuntimeError', 'PiCameraValueError', 'PiCameraWarning', 'PiCookedMultiImageEncoder', 'PiCookedOneImageEncoder', 'PiCookedVideoEncoder', 'PiEncoder', 'PiImageEncoder', 'PiMultiImageEncoder', 'PiNullSink', 'PiOneImageEncoder', 'PiOverlayRenderer', 'PiPreviewRenderer', 'PiRawImageMixin', 'PiRawMixin', 'PiRawMultiImageEncoder', 'PiRawOneImageEncoder', 'PiRawVideoEncoder', 'PiRenderer', 'PiVideoEncoder', 'PiVideoFrame', 'PiVideoFrameType', 'Red', 'Saturation', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'absolute_import', 'bcm_host', 'camera', 'color', 'division', 'encoders', 'exc', 'mmal', 'mmal_check', 'print_function', 'renderers', 'str', 'streams', 'unicode_literals']
>>>
pi@apollo:~$
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Python”