Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the scapy installation failing on Mac?

When I try installing scapy on Mac, I get this error:

  Collecting scapy
  Downloading scapy-2.3.1.zip (1.1MB)
    100% |████████████████████████████████| 1.1MB 436kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/tmp/pip-build-f7vu4fsp/scapy/setup.py", line 35
        os.chmod(fname,0755)
                          ^
    SyntaxError: invalid token

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-f7vu4fsp/scapy

I tried using pip install scapy and pip3 install scapy.

like image 453
Zept Avatar asked Nov 21 '15 23:11

Zept


People also ask

Does Scapy work with python3?

Scapy runs natively on Linux, Windows, OSX and on most Unixes with libpcap (see scapy's installation page). The same code base now runs natively on both Python 2 and Python 3.

How do I know what version of Scapy I have?

If you are using python3, you can use your package manager (pip) pip3 list and find spacy's version.


1 Answers

To install scapy for python3, you have to run pip3 install scapy-python3. Just pip3 install scapy will install old 2.x version, which is not python3 compatible.

like image 74
Eriks Dobelis Avatar answered Oct 05 '22 09:10

Eriks Dobelis