scapy3 command not found

In this troubleshooting guide we learn how to fix scapy3 command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

scapy3: command not found

or when using sudo you get the following error message

sudo: scapy3: command not found

Solutions to scapy3: command not found

How To Fix scapy3: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu scapy3 is provided by python3-scapy package.

python3-scapy is:

Scapy is a powerful interactive packet manipulation tool, packet generator, network scanner, network discovery, packet sniffer, etc. It can for the moment replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, tethereal, p0f, ….

In scapy you define a set of packets, then it sends them, receives answers, matches requests with answers and returns a list of packet couples (request, answer) and a list of unmatched packets. This has the big advantage over tools like nmap or hping that an answer is not reduced to (open/closed/filtered), but is the whole packet.

This package contains the Python 3 version of the library and scapy executable.

To fix this problem, we can install more using the command below.

sudo apt-get -y install python3-scapy

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install python3-scapy.

sudo apt -y install python3-scapy

Or if you have aptitude installed you can use the following command.

sudo aptitude install python3-scapy

Summary

In this tutorial we learn how to fix scapy3 command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.