Scapy problems when importing modules

落花浮王杯 提交于 2019-12-25 05:26:10

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/17704520/scapy-problems-when-importing-modules

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!