question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No module named pcapy

See original GitHub issue

After cloning the repo and installing the requirements with pip (scapy, specifically), I try to run the program (both in normal and sudo mode) and this is what I get. Do you know what I’m doing wrong?

python kickthemout.py 
Traceback (most recent call last):
  File "kickthemout.py", line 12, in <module>
    import scan, spoof
  File "/Users/Maslor/Desktop/kickthemout/scan.py", line 9, in <module>
    import scapy.config, scapy.layers.l2, scapy.route, socket, math, errno
  File "/Users/Maslor/Desktop/kickthemout/lib/python2.7/site-packages/scapy/layers/l2.py", line 16, in <module>
    from scapy.ansmachine import *
  File "/Users/Maslor/Desktop/kickthemout/lib/python2.7/site-packages/scapy/ansmachine.py", line 14, in <module>
    from scapy.sendrecv import send,sendp,sniff
  File "/Users/Maslor/Desktop/kickthemout/lib/python2.7/site-packages/scapy/sendrecv.py", line 14, in <module>
    from scapy.arch.consts import DARWIN, FREEBSD
  File "/Users/Maslor/Desktop/kickthemout/lib/python2.7/site-packages/scapy/arch/__init__.py", line 79, in <module>
    from scapy.arch.pcapdnet import *
  File "/Users/Maslor/Desktop/kickthemout/lib/python2.7/site-packages/scapy/arch/pcapdnet.py", line 328, in <module>
    import pcapy as pcap
ImportError: No module named pcapy

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
k4m4commented, Jan 12, 2017

I see. Generally, there are quite a few issues when installing scapy on a Mac OS X. I would recommend doing $ sudo pip uninstall scapy and attempting to download it through homebrew: $ brew install scapy.

1reaction
SentinelWarrencommented, Jan 15, 2017

@k4m4 @xdavidhu sorry, i meant the module won’t be on formulae but in homebrew/python/scapy python tap so was supposed to be something like brew install homebrew/python/scapy at least its how it works to me when i install python modules using brew!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scapy error: no module names pcapy - python - Stack Overflow
try this to import For Ubuntu $ sudo apt-get install python-pcapy. You can also build it from source:
Read more >
ImportError: No module named pcapy · Issue #6 - GitHub
I got this error everytime I try to launch the script :( I'm running Windows 10, python 2.7.13 $ python CyberScan.py Traceback (most...
Read more >
ModuleNotFoundError: No module named 'pcapy'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'pcapy' How to remove the ModuleNotFou.
Read more >
How to fix "ModuleNotFoundError: No module named 'pcapy'"
How to fix "ModuleNotFoundError: No module named 'pcapy'" ... You must first install the package before you can use it in your code....
Read more >
Installing Scapy on a Mac - No module named pcapy - iTecNote
Python – Installing Scapy on a Mac: “ImportError: No module named pcapy”. macospythonscapy. I'm trying to run a python script that involves scapy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found