Python scapy import error

前端 未结 8 813
小蘑菇
小蘑菇 2021-01-17 14:38

If I include following line in my python source file

from scapy.all import *

I get this error

from scapy.all import *
Impor         


        
相关标签:
8条回答
  • 2021-01-17 14:40

    If scapy is not installed in your system, then you can use this command to install scapy:

    sudo apt-get install python-scapy

    0 讨论(0)
  • 2021-01-17 14:40

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

    sudo apt-get install python-scapy
    
    0 讨论(0)
  • 2021-01-17 14:45

    I think there was a change is scapy somewhere. I put the following code in my scapy projects so it remains compatible.

    try:
        import scapy
    except ImportError:
        del scapy
        from scapy import all as scapy
    
    0 讨论(0)
  • 2021-01-17 14:46

    If you use Linux get this folder:

    /usr/share/pyshared
    

    If you not found scapy you must download and install this, for example for Ubuntu you can found this:

    http://packages.ubuntu.com/precise/all/python-scapy/download

    and download package and install this pack about 300 kb.

    0 讨论(0)
  • 2021-01-17 14:52

    from kamene.all import * WARNING: No route found for IPv6 destination :: (no default route?). This affects only IPv6

    Use this one instead of scapy.all

    0 讨论(0)
  • 2021-01-17 14:57

    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!

    0 讨论(0)
提交回复
热议问题