Try -E switch to preserve environment.
When you try to use sudo,it does not recognize the system path.
So need sudo install to,or try make a virtual environment(build into Python) and run scapy from there.
sudo -E python script_name.py
(Feb-05-2022, 02:53 PM)jao Wrote: Why does this happen? Does this problem have a solution?The problem is that the package scapy has been installed as user and not as root.
When you try to use sudo,it does not recognize the system path.
So need sudo install to,or try make a virtual environment(build into Python) and run scapy from there.