Scapy on Mavericks via Homebrew "AttributeError: 'module' object has no attribute 'intf'" I tried to install Scapy on OS X via Homebrew which seemed to work fine.
After installation there were some Python modules missing which I installed via Homebrew.

Now when I start Scapy I get the following error:

INFO: Can't import python gnuplot wrapper . Won't be able to plot.
Traceback (most recent call last):
File "/usr/local/bin/scapy", line 25, in &lt;module&gt;
interact()
File "/usr/local/lib/python2.7/site-packages/scapy/main.py", line 278, in interact
scapy_builtins = __import__("all",globals(),locals(),".").__dict__
File "/usr/local/lib/python2.7/site-packages/scapy/all.py", line 25, in &lt;module&gt;
from route import *
File "/usr/local/lib/python2.7/site-packages/scapy/route.py", line 162, in &lt;module&gt;
conf.route=Route()
File "/usr/local/lib/python2.7/site-packages/scapy/route.py", line 22, in __init__
self.resync()
File "/usr/local/lib/python2.7/site-packages/scapy/route.py", line 31, in resync
self.routes = read_routes()
File "/usr/local/lib/python2.7/site-packages/scapy/arch/unix.py", line 86, in      read_routes
ifaddr = scapy.arch.get_if_addr(netif)
File "/usr/local/lib/python2.7/site-packages/scapy/arch/__init__.py", line 36, in get_if_addr
return socket.inet_ntoa(get_if_raw_addr(iff))
File "/usr/local/lib/python2.7/site-packages/scapy/arch/pcapdnet.py", line 187, in   get_if_raw_addr
i = dnet.intf()
AttributeError: 'module' object has no attribute 'intf'


Anyone with some ideas?
I seem to have fixed this issue for myself, I think it's due to a corrupt/buggy "egg" file. I cannot guarantee this will work for you, but I've had this problem for the last 2 months, word for word. And now, I can at least get into scapy.

First of all, I found my Python install's paths, with this command:

python -c "import sys; print sys.path"


In my case, the first few paths were various .egg files. Try removing the pydnet egg, which in my case is called PyDNET-0.92-py2.7.egg. I haven't really tested it too much at this point, but scapy boots, at least. So we know where the problem must be.