1. Create a folder to put scapy
mkdir scapy
2. Pull the scapy installation package from git, if the network is not good, please visit directly to download zip
git clone https://github.com/secdev/scapy
3. After downloading or decompressing, enter the directory
cd scapy-master
4. Install scapy
sudo python setup.py install
5. Check whether the installation is successful
scapy
Just install the relevant packages