title: python picamera OSError: dlopen(libmmal.so, 6): image not found
body: <p>I am trying to use picamera to do a video streaming on my Mac(python 2.7).
  I have installed picamera by this command:</p>
  
  <p><strong>(venv)55-213:video_streaming mreko$ pip install picamera<br><br>
  Requirement already satisfied (use --upgrade to upgrade): picamera in ./venv/lib/python2.7/site-packages</strong></p>
  
  <p>Then I wrote a py script trying to test the picamera:</p>
  
  <p><strong>import time<br>
  import picamera<br>
  with picamera.PiCamera() as camera:<br>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; camera.resolution = (1024, 768)<br>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; camera.start_preview()<br>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Camera warm-up time<br>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time.sleep(2)<br>
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;camera.capture('foo.jpg')</strong><br></p>
  
  <p>However,when I compile this py script,it throws an error:</p>
  
  <p><strong>(venv)55-213:video_streaming mreko$ python test.py<br><br><br>
  Traceback (most recent call last):
    File "test.py", line 2, in 
      import picamera
    File "/Users/mreko/python_workstation/video_streaming/venv/lib/python2.7/site-packages/picamera/__init__.py", line 258, in 
      from picamera.exc import (
    File "/Users/mreko/python_workstation/video_streaming/venv/lib/python2.7/site-packages/picamera/exc.py", line 41, in 
      import picamera.mmal as mmal
    File "/Users/mreko/python_workstation/video_streaming/venv/lib/python2.7/site-packages/picamera/mmal.py", line 47, in 
      _lib = ct.CDLL('libmmal.so')
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__
      self._handle = _dlopen(self._name, mode)
  OSError: dlopen(libmmal.so, 6): image not found</strong></p>
  
  <p>I know the extention of lib on mac is 'dylib'.I change 'libmmal.so' into 'libmmal.dylib'.However,still it can't work.</p>
  
  <p>Then I search the /usr/lib/,I found there is no dylib name 'libmmal'.</p>
  
  <p>So I don't know how to solve this problem.Maybe the picamera can't support Mac?
  Or is there any way that I can intall libmmal.dylib file to support the picamera?</p>
  
  <p>It really makes me upset!!
  Thanks a lot!</p>