2016-08-02 13 views
-1

Ich verwende Python-Version 2.7 und PyCharm IDE zu installieren, installierte ich scapy Modul über PyCharm UI (Datei --- Standardeinstellung - hinzugefügt scapy)Nicht in der Lage scapy Modul in Python

from scapy.all import DNS 


Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/Users/apple/Library/Python/2.7/lib/python/site-packages/scapy/all.py", line 16, in <module> 
    from arch import * 
    File "/Users/apple/Library/Python/2.7/lib/python/site-packages/scapy/arch/__init__.py", line 76, in <module> 
    from bsd import * 
    File "/Users/apple/Library/Python/2.7/lib/python/site-packages/scapy/arch/bsd.py", line 12, in <module> 
    from unix import * 
    File "/Users/apple/Library/Python/2.7/lib/python/site-packages/scapy/arch/unix.py", line 20, in <module> 
    from pcapdnet import * 
    File "/Users/apple/Library/Python/2.7/lib/python/site-packages/scapy/arch/pcapdnet.py", line 173, in <module> 
    import dnet 
ImportError: No module named dnet 

wenn ich laufe obige Aussage über Fehler, den es zeigt, installierte ich scapy Modul erfolgreich ...

+0

Ist das der vollständige Code? Woher kommt das 'dnet'? –

+0

Nein, dieser Fehler habe ich, wenn ich im Python-Terminal laufe – abc

Antwort

0

Sie libdnet

$ wget http://libdnet.googlecode.com/files/libdnet-1.12.tgz 
$ tar xfz libdnet-1.12.tgz 
$ ./configure 
$ make 
$ sudo make install 
$ cd python 
$ python2.5 setup.py install 

Für 64-Bit installieren ....

$ CFLAGS='-arch i386 -arch x86_64' ./configure 
$ archargs='-arch i386 -arch x86_64' make