
I would recommend using a virtual environment manager to create a separate virtual environment of your choice of python version which could be 2.7 or 3.8 or whatever and then install and use scapy python package for your project inside your virtual environment. Using sys.path they're trying to add the path to the installed scapy location, basically, pip install packages in lib/python/site-packages/ since python interpreter you're using to run the program containing the use of scapy python package don't have scapy in site-packages that's why interpreter is raising ImportError: No module named scapy.all!
UTscapy: Unit Testing with scapy (shipped with Scapy 2.Most of the answers here are helping you to install scapy on system-level and run with sudo access. BPF filters do not work on PPP interfaces. To send a mail to the mailing-list: scapy.ml(at). To subscribe to the mailing-list, send a mail to scapy.ml-subscribe(at). To avoid spam, you must subscribe to the mailing list to post. Send questions, bug reports, suggestions, ideas, cool usages of Scapy, etc. You will also find an article in the French Linux Magazine #52. Scapy’s Summerschool Applied IT Security 2005 slides. Scapy’s PacSec/core05 slides ( printable version). Automotive Penetration Testing with Scapy - Troopers 2019 slides. Automotive Network Scans with Scapy - Troopers 2022 slides. Head over to Scapy’s GitHub Projects to see what is being worked on. It provides the ticket management service used for submitting patches or bugs. Scapy reference repository is hosted on GitHub secdev/scapy. Scapy development uses Git version control system.
Security Power Tools where Philippe Biondi wrote a complete chapter about Scapy.ThePacketGeek’s Building Network Tools with Scapy tutorial.
* Received 2 packets, got 1 answers, remaining 0 packets > r > Help, documentation Documents dev221 ) > p = IP ( dst = "" ) / ICMP () > p > r = sr1 ( p ) Begin emission : Finished sending 1 packets.