-1

I am trying to run the following code but I get a error saying "no module named scapy". I have installed scapy using pip install scapy.

import scapy.all as scapy


def scan(ip):
    scapy.arping(ip)

scan("192.168.0.14")
Julia12
  • 87
  • 7

2 Answers2

0

This is an error that often happens to people that are new to Scapy.

If you are still experiencing this error. please consider trying: pip3 install scapy.all

Then: from scapy.all import scapy, ARP, Ether, srp, arping

Benshii
  • 1
  • 4
0

what worked for me was, Moving your python file to directory where scapy is installed. I use pycharm and scapy is installed in venv/lib. Make directory there (venv) and continue making python files. it should find scapy

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 18 '22 at 13:51