Python scapy import error

2020-04-02 07:27发布

If I include following line in my python source file

from scapy.all import *

I get this error

from scapy.all import *
ImportError: No module named all

Which is true in Console and IDLE, but not eclipse. I am very much confused why this is happening. Can some one help me out?

标签: python scapy
8条回答
叼着烟拽天下
2楼-- · 2020-04-02 08:14

I think this may be a problem with your version:

If you are using Scapy v1.X:

from scapy import *

Otherwise, with Scapy V2.X+

from scapy.all import *

Is the way to go.

Hope that helps!

查看更多
迷人小祖宗
3楼-- · 2020-04-02 08:15

If scapy is not installed, please install with this command:

sudo apt-get install python-scapy
查看更多
登录 后发表回答