Feb-05-2022, 03:30 PM
(Feb-05-2022, 03:14 PM)snippsat Wrote: Try -E switch to preserve environment.
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.
It worked, thank you
![Big Grin Big Grin](https://python-forum.io/images/smilies/biggrin.png)
sudo pip3 install scapy
i would still have the same problem?I intend to create an executable with this script for it to work on other computers, will it be necessary to run this script with root permission?