I followed a guide on youtube to set up my raspberry pi. I'm trying to use python for facial recognition but the camera is not working.

I did

vcgencmd get_camera

in the terminal but the result was

supported=0 detected=0

Does anyone have any idea why supported shows 0?

  • maybe the camera is not supported ... or it is not connected ... or it is defective ... or etc. etc.
    – jsotola
    Nov 25, 2021 at 7:01
  • 1
    supported=0 means you haven't enabled camera at all - note: you hopefully are running buster, not bullseye
    – Bravo
    Nov 25, 2021 at 8:27
  • 1
    lsb_release -a - go back to buster by downloading and flash buster image
    – Bravo
    Nov 29, 2021 at 2:16
  • 1
    let me make that clearer ... buster lite - no GUI and buster regular - with GUI - as far as flashing the image - what did you use this time
    – Bravo
    Nov 29, 2021 at 2:34
  • 1
    @jwbradley - i wouldn't be so quick to trust a year old comment :p
    – Bravo
    Dec 16, 2022 at 3:02

4 Answers 4


If you are using the new Raspberry Pi OS, the camera interface is disabled. The workaround is to open a terminal Ctrl+Alt+t and type sudo raspi-config, go to Interface Options and then Legacy Camera and reboot. These camera interfaces are deprecated and will not be supported going forwards. So use with caution and check for updates.


Using the latest Raspberry Pi OS, bookworm, my Pi Zero W v1.1 reports the camera is missing with the following:

~ $ vcgencmd get_camera
supported=0 detected=0, libcamera interfaces=0

However, I can see it is connected by running:

~ $ libcamera-still --list-cameras
Available cameras
0 : ov5647 [2592x1944 10-bit GBRG] (/base/soc/i2c0mux/i2c@1/ov5647@36)
    Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16, 0)/2560x1920 crop]
                             1296x972 [43.25 fps - (0, 0)/2592x1944 crop]
                             1920x1080 [30.62 fps - (348, 434)/1928x1080 crop]
                             2592x1944 [15.63 fps - (0, 0)/2592x1944 crop]

And I can take pictures without issue:

libcamera-still -o snap.jpg
  • So, apparently, the camera is already enabled by default if using libcamera when using the latest Raspberry Pi OS (bookworm). The legacy camera is disabled and won't show up in raspi-config anymore. Following the commands you posted confirms that the camera is indeed working and accessible. 2 days ago
  1. Check first if the camera is supported

2. Try a powered USB hub to plug in the camera / maybe it isnt getting enough power

Then you can install this tool to test out the camerasudo apt-get install luvcview

  • 1
    its a raspberry pi camera that came with the raspberry pi itself
    – suinuj
    Nov 29, 2021 at 1:37
  • what makes you think this is a USB camera?
    – Bravo
    Nov 29, 2021 at 2:32

I used the libcamera-still command and it worked in the morning Then i installed dlib After that the same command showed the error "no cameras available" I could access camera through raspcontroller...but not through camera legacy. I could access it through camera (usb) Then i tried sudo apt-get install fswebcam fswebcam image.jpg ...and bingo ! It worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.