在 python ubuntu 20.04 中使用 PiCamera 时出现函数未实现错误

在 python ubuntu 20.04 中使用 PiCamera 时出现函数未实现错误

我在 Raspberry pi 4 上使用 ubuntu 20.04。我使用了 Raspberry pi 相机。但是 PiCamera() 模块不起作用,尽管我用 pip 安装了它并且raspistill -o image.jpeg工作正常,所以相机设置成功。这是错误

 python3 -c "from picamera import PiCamera; PiCamera()"
mmal: mmal_component_create_core: could not find component 'vc.camera_info'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/pi/.local/lib/python3.8/site-packages/picamera/camera.py", line 367, in __init__
    with mo.MMALCameraInfo() as camera_info:
  File "/home/pi/.local/lib/python3.8/site-packages/picamera/mmalobj.py", line 2346, in __init__
    super(MMALCameraInfo, self).__init__()
  File "/home/pi/.local/lib/python3.8/site-packages/picamera/mmalobj.py", line 631, in __init__
    mmal_check(
  File "/home/pi/.local/lib/python3.8/site-packages/picamera/exc.py", line 184, in mmal_check
    raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Failed to create MMAL component b'vc.camera_info': Function not implemented

相关内容