TheTeaRex TheTeaRex - 24 days ago 10
Python Question

pip install scapy getting SyntaxError: invalid token

I am getting the following error when trying to sudo pip install scapy, can anyone help?

sudo pip install scapy
Collecting scapy
Downloading scapy-2.3.3.tgz (1.4MB)
100% |████████████████████████████████| 1.4MB 1.1MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-uuv1l4x3/scapy/setup.py", line 36
os.chmod(fname, 0755)
^
SyntaxError: invalid token

----------------------------------------

Answer

Seems like this question has already been asked here ! Try fixing it using the recipes suggested, see if it works.