bludelft
Posts: 8
Joined: Sun Aug 03, 2014 4:05 am

Issues with Python picamera

Tue Aug 12, 2014 3:18 am

I've installed and tested my picamera. I'm able to take a picture with the command line. However, when I try to use python, I get an error.

I installed with:

Code: Select all

 sudo apt-get install python-picamera
When I try to use python, I get:

Code: Select all

Python 2.7.3 (default, Mar 18 2014, 05:13:23) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import picamera
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/picamera/__init__.py", line 230, in <module>
    from picamera.exc import (
  File "/usr/lib/python2.7/dist-packages/picamera/exc.py", line 41, in <module>
    import picamera.mmal as mmal
  File "/usr/lib/python2.7/dist-packages/picamera/mmal.py", line 1731, in <module>
    mmal_queue_timedwait = _lib.mmal_queue_timedwait
  File "/usr/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /opt/vc/lib/libmmal.so: undefined symbol: mmal_queue_timedwait

jigar234
Posts: 2
Joined: Sat Aug 16, 2014 8:39 pm

Re: Issues with Python picamera

Sat Aug 16, 2014 8:41 pm

I'm seeing the same issue. Any luck with this?

jigar234
Posts: 2
Joined: Sat Aug 16, 2014 8:39 pm

Re: Issues with Python picamera

Sat Aug 16, 2014 9:49 pm

Figured it out.

run:
sudo apt-get update && sudo apt-get upgrade

Eze323
Posts: 2
Joined: Sat Sep 06, 2014 2:31 am

Re: Issues with Python picamera

Sat Sep 06, 2014 2:35 am

I have the exact same problem but the solution listed didnt work for me. It took a very long time and then reset itself and then repeated the error message upon my retrying the run the python program.

also note, im crazy new at this but do have other programming knowledge(ish)

Eze323
Posts: 2
Joined: Sat Sep 06, 2014 2:31 am

Re: Issues with Python picamera

Sun Sep 07, 2014 1:47 am

should anyone else end up with this issue it seems i fixed it,

ran:

sudo apt-get install python-picamera python3-picamera python-rpi.gpio

it said I had to run:

sudo dpkg --configure -a

so I did and then ran the code listed in the post above:

sudo apt-get update && sudo apt-get upgrade

and then happiness returned...

Return to “Troubleshooting”