The code given below is for sniffing a packet from the IP address provided.
from scapy.all import *
sniff(filter=\"tcp and host 192.168.0.90\", count=10)
try this to import For Ubuntu
$ sudo apt-get install python-pcapy
You can also build it from source:
$ sudo pip install "http://corelabs.coresecurity.com/index.php?module=Wiki&action=attachment&type=tool&page=Pcapy&file=pcapy-0.10.8.tar.gz"
And here is good documentation of Scapy. http://www.secdev.org/projects/scapy/doc/installation.html
For Windows, you can download and run setup.py file from the below link as per your requirement version.
http://corelabs.coresecurity.com/index.php?module=Wiki&action=view&type=tool&name=Pcapy
http://breakingcode.wordpress.com/2012/07/16/quickpost-updated-impacketpcapy-installers-for-python-2-5-2-6-2-7/