When using in a command Install fswebcam.
sudo apt install fswebcam
fswebcam photo.jpg
When using with Python Install opencv.
/etc/apt/sources.list
deb http://ftp.jaist.ac.jp/raspbian jessie main contrib non-free
deb http://ftp.yz.yamagata-u.ac.jp/pub/linux/raspbian/raspbian/ jessie main cont
rib non-free
sudo apt install libopencv-dev
sudo apt install python-opencv
usb_camera.py
#! /usr/bin/python
# -*- coding: utf-8 -*-
#
# usb_camera.py
#
# Jun/06/2017
# --------------------------------------------------------------------
import sys
import cv2
#
sys.stderr.write("***start***\n")
#
cc = cv2.VideoCapture(0)
#
rr, img = cc.read()
cv2.imwrite('photo.jpg', img)
#
sys.stderr.write("***End***\n")
# --------------------------------------------------------------------