How to troubleshoot a module import problem in a scapy script
If you try to run a Python script importing some module and you get this following issue: NameError: name 'IP' is not defined or ImportError: No module named all check your Python script name. Probably you are using some reserved name from a function. To fix it, rename your Python script for other name, like lala.py (to be sure you are not using a reserved function name). Don't forget delete any .pyc file that can has any conflict with any function name. Here's an example about how to fix it: mv new.py lala.py rm new.pyc python lala.py Enjoy it!