Problems with scapy when importing modules

I recently started programming in python and scapy. But when I use scapy.all import *, it does not work, and I get an exception. ImportError: There is no module named "base_classes". Thus, it finds the entire folder, but cannot find base_classes. However, I confirmed that base_classes is actually there. In the extension import, scapy.all.base_classes detects that there is base_classes, but when I execute it, I get an error message. What should I do? I checked my scapy version and it is 2.x.

Thanks. Martinos

0
source share
1 answer

I ran into a similar problem once, and this happened because I did not use the correct python version and the correct python path.

I solved this by adding the correct classes to the path at the beginning of my script using

import sys sys.path.append("/home/me/mypy") 

It's a little ugly, but it worked.

+1
source

All Articles