To install picamera on Raspbian, it is best to use the system’s package
manager: apt. This will ensure that picamera is easy to keep up to date, and
easy to remove should you wish to do so. It will also make picamera available
for all users on the system. To install picamera using apt simply run:

On distributions other than Raspbian, it is probably simplest to install system
wide using Python’s pip tool:

$ sudo pip install picamera

If you wish to use the classes in the picamera.array module then specify
the “array” option which will pull in numpy as a dependency:

$ sudo pip install "picamera[array]"

Warning

Be warned that older versions of pip will attempt to build numpy from
source. This will take a very long time on a Pi (several hours on slower
models). Modern versions of pip will download and install a pre-built
numpy “wheel” instead which is much faster.

The behaviour of the Pi’s camera module is dictated by the Pi’s firmware. Over
time, considerable work has gone into fixing bugs and extending the
functionality of the Pi’s camera module through new firmware releases. Whilst
the picamera library attempts to maintain backward compatibility with older Pi
firmwares, it is only tested against the latest firmware at the time of
release, and not all functionality may be available if you are running an older
firmware. As an example, the annotate_text attribute relies
on a recent firmware; older firmwares lacked the functionality.

You can determine the revision of your current firmware with the following
command:

On Raspbian, the standard upgrade procedure should keep your firmware
up to date:

$ sudo apt-get update
$ sudo apt-get upgrade

Warning

Previously, these documents have suggested using the rpi-update utility
to update the Pi’s firmware; this is now discouraged. If you have
previously used the rpi-update utility to update your firmware, you can
switch back to using apt to manage it with the following commands:

Please note that the PiTFT screen (and similar GPIO-driven screens)
requires a custom firmware for operation. This firmware lags behind the
official firmware and at the time of writing lacks several features
including long exposures and text overlays.