Scapy Installation fail on Windows 7 64 bit Python 3.5
Question: I have been going crazy with this installation but nothing seems to work.

Python 3.5 is installed under : "C:\Program Files (x86)\Python35-32", so there
is a space in between.

I installed scapy in 2 ways:

  1. pip3 install scapy-python3
  2. From the website <http://www.secdev.org/projects/scapy>, I downloaded the link for Scapy-2.3.2 and then compiling it as python setup.py install (This was most likely for Python 2 because first, it failed on fname(chmod,0755) which I corrected to fname(chmod,0o755) but it expected some more arguments)

With each I tried running scapy terminal but to no-avail. It returns the
following error:

    
    
    python: can't open file 'C:\Program': [Errno 2] No such file or directory
    

Tried running the following code (want to ping google):

    
    
    from scapy.all import sr1,IP,ICMP
    
    p=sr1(IP(dst="8.8.8.8")/ICMP())
    if p:
        p.show()
    

But get the following error:

    
    
    WARNING: Windows support for scapy3k is currently in testing.
    
    Sniffing/sending/receiving packets should be working with WinPcap driver and
    Powershell. Create issues at https://github.com/phaethon/scapy
    Traceback (most recent call last):
    File "C:\Users\rads x\Desktop\FIX\connectivity.py", line 13, in
    <module>
    
    from scapy.all import sr1,IP,ICMP
    File "C:\Program Files (x86)\Python35-32\lib\site-packages\scapy\all.py",
    line 16, in <module>
    from .arch import *
    File "C:\Program Files (x86)\Python35-32\lib\site-
    packages\scapy\arch\__init__.py", line 88, in <module>
    from .windows import *
    File "C:\Program Files (x86)\Python35-32\lib\site-
    packages\scapy\arch\windows\__init__.py", line 23, in <module>
    from scapy.arch import pcapdnet
    File "C:\Program Files (x86)\Python35-32\lib\site-
    packages\scapy\arch\pcapdnet.py", line 32, in <module>
    from .winpcapy import *
    File "C:\Program Files (x86)\Python35-32\lib\site-\
    packages\scapy\arch\winpcapy.py", line 26, in <module>
    _lib=CDLL('wpcap.dll')
    File "C:\Program Files (x86)\Python35-32\lib\ctypes\__init__.py", line 347, 
    in __init__
    self._handle = _dlopen(self._name, mode)
    OSError: [WinError 126] The specified module could not be found
    


Answer: According to the docs scrapy is not supported on Windows with Python 3.x due
to missing dependency (Twisted)

Source: <http://doc.scrapy.org/en/latest/intro/install.html>

