[![](https://openthread.io/static/images/icon-github.svg)View source on GitHub](https://github.com/openthread/ot-docs/tree/main/site/en/guides/pyspinel/install-pyspinel.md)

Your installation options depend on how you use Pyspinel.

[Extcap](https://www.wireshark.org/docs/man-pages/extcap.html) is a plugin for Wireshark that allows
it to use the Pyspinel binary as a capture interface. Extcap reduces the setup
and configuration needed to sniff Thread packets using Wireshark, as it does not
require writing to a capture file. With this option, configurations are managed and
saved in Wireshark, for example setting your Thread channel and selecting your RCP
or NCP device path from the GUI.

You can also use Wireshark without the extcap plugin. This option provides
command line access to [Pyspinel flags](https://github.com/openthread/pyspinel/tree/master/SNIFFER.md), allowing you to run the sniffer with
various configurations. You can set these flags every time you run the sniffer,
for example, `--channel 15 --uart /dev/ttyACM0`.

## Install Pyspinel and dependencies without extcap

1. Install dependencies:

       sudo apt install python3-pip
       pip3 install --user pyserial ipaddress

2. Clone the Pyspinel repository:

       git clone https://github.com/openthread/pyspinel

3. Install Pyspinel:

       cd pyspinel
       sudo python3 setup.py install

Alternatively, set up the environment by installing the `pyspinel` package. Note
that this package uses the [Pyspinel v1.0.0a3 release](https://github.com/openthread/pyspinel/releases/tag/v1.0.0a3) and not
the latest Pyspinel main.

    pip3 install --user pyspinel

To use Pyspinel without the extcap plugin, refer to [Packet Sniffing with Pyspinel](https://openthread.io/guides/pyspinel/sniffer).

## Install Pyspinel and dependencies with extcap

1. Install dependencies:

       sudo apt install python3-pip
       pip3 install --user pyserial ipaddress

2. Clone the Pyspinel repository:

       git clone https://github.com/openthread/pyspinel

3. Open Wireshark. Go to **Help** , then **About Wireshark** and select the **Folders** tab. The **Extcap path** entry lists the extcap location. Make note of this location.
4. Install Pyspinel, using the extcap path from Wireshark:

       cd pyspinel
       sudo python3 setup.py install --extcap-path=extcap-path

Alternatively, set up the environment by installing the pyspinel package:

    pip3 install pyspinel --install-option="--extcap-path=extcap-path"

> [!NOTE]
> **Note:** On Windows, clone the `pyspinel` repository, install the package from the cloned directory (`cd pyspinel && pip3 install .`), then copy `extcap_ot.py` and `extcap_ot.bat` into the Wireshark Extcap path directory.

To use Pyspinel with the extcap plugin, refer to [Packet Sniffing using Extcap](https://openthread.io/guides/pyspinel/sniffer-extcap).