简体   繁体   中英

Scapy problems when importing modules

I recently started programming in python and scapy. But when i use from scapy.all import * it doesnt work and i get the exception ImportError: No module named 'base_classes'. So it is finding the folder all, but cannot find base_classes. I verified however that base_classes is actually in there. In extend, import scapy.all.base_classes finds that there are base_classes in there but when i execute it i stil get an error. What should i do? i verified my version of scapy and it is 2.x.

Thank you Martinos

I ran into a similar issue once and it was because I wasn't using the right version of python and the right python path.

I solved it by adding the right classes to the path in the beginning of my script using

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

It's a bit ugly but it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM