11

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?

rda3mon
  • 1,709
  • 4
  • 25
  • 37

8 Answers8

10

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

sudo apt-get install python-scapy

Snake Eyes
  • 325
  • 5
  • 18
9

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!

Cukic0d
  • 5,111
  • 2
  • 19
  • 48
dc5553
  • 1,243
  • 11
  • 21
2

Delete any file named scapy.py

Utopia
  • 278
  • 1
  • 3
  • 19
2

I want to contribute to this problem. Watch for files named "scapy" in your directory where u are using your script. I had one named "scapy.py" and obviously python tries to include from ".". I removed script and: import scapy.all import * works fine.

romanikov
  • 21
  • 1
1

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
Daenyth
  • 35,856
  • 13
  • 85
  • 124
AJ00200
  • 16,327
  • 7
  • 23
  • 21
0

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.

A1Gard
  • 4,070
  • 4
  • 31
  • 55
0

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

sudo apt-get install python-scapy
-2

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