Hi,everybody！Please help me out,I am so frustrated...
Here is my issue:
I'm trying to use PI camera on Mac(Python2.7) to do a live video streaming.
First of all,I install the PI camera by using pip install picamera:
(venv)55-213:video_streaming mreko$ pip install picamera
Requirement already satisfied (use --upgrade to upgrade): picamera in ./venv/lib/python2.7/site-packages
Then,I write a py script:
with picamera.PiCamera() as camera:
camera.resolution = (1024, 768)
# Camera warm-up time
Then I compile this file it throw an error:
(venv)55-213:video_streaming mreko$ python test.py
Traceback (most recent call last):
File "test.py", line 2, in <module>
File "/Users/mreko/python_workstation/video_streaming/venv/lib/python2.7/site-packages/picamera/__init__.py", line 258, in <module>
from picamera.exc import (
File "/Users/mreko/python_workstation/video_streaming/venv/lib/python2.7/site-packages/picamera/exc.py", line 41, in <module>
import picamera.mmal as mmal
File "/Users/mreko/python_workstation/video_streaming/venv/lib/python2.7/site-packages/picamera/mmal.py", line 47, in <module>
_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
I guess it can not find 'libmmal.so' on my mac lib.
And I know on Mac,the lib's suffix is 'dylib'.Therefore,I changed it into 'libmmal.dylib'.But still,it can't find it.
I really don't know how to solve this problem.I wonder maybe Picamera can't support Mac?Is there any Picamera version for mac? Or is there any way that I can install libmmal.dylib on mac?
Please help me out!
I hope you can give me the answer.It drives me crazy!
Thank a lot!