# Installing OpenCV on Raspberry Pi Zero 1.3/ W with Python, PiCamera

**URL:** <https://forum.opencv.org/t/installing-opencv-on-raspberry-pi-zero-1-3-w-with-python-picamera/3999>\
**Category:** Python\
**Created:** [June 24, 2021, 2:15am UTC](https://forum.opencv.org/t/installing-opencv-on-raspberry-pi-zero-1-3-w-with-python-picamera/3999 "2021-06-24T02:15:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tron777](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/tron777/32/2472_2.png) [@Tron777](https://forum.opencv.org/u/Tron777)\
**Post date:** [June 24, 2021, 2:15am UTC](https://forum.opencv.org/t/installing-opencv-on-raspberry-pi-zero-1-3-w-with-python-picamera/3999/1 "2021-06-24T02:15:52Z")

</div>

# Installing OpenCV on Raspberry Pi Zero

For all those who would like to install OpenCV on Raspberry Pi Zero 1.3 (and possibly W but not tested), here are the instructions:

## Instructions

1. Run following commands:

```auto
$ sudo apt-get update
$ sudo apt-get upgrade

```

1. Enable and check camera interface. Run commands below:

```auto
$ sudo raspi-config
$ raspistill -o image.jpg

```

1. Check if python is installed. If not installed, run the second command (Numpy and other python libraries possibly included. No extra installation required.):

```auto
$ python --version
$ sudo apt install python3-opencv

```

1. Run Python 3 and check if OpenCV works.

```auto
>>> import cv2
>>> import numpy

>>> cv2. __version__
>>> numpy. __version__

```

1. Install picamera module if not installed and checked through Python CLI.

```auto
$ sudo apt-get install python3-picamera

```

1. Test camera through Linux Terminal

```auto
raspistill -o image.jpg

```

Please let me know if there are any changes that can be made to this or updates as well. These instructions to installing OpenCV on Raspberry Pi Zero 1.3 can change any time.
