tintinweb / scapy-ssl_tls

SSL/TLS layers for scapy the interactive packet manipulation tool
GNU General Public License v2.0
417 stars 157 forks source link

Pip Install Error #159

Open egecemkirci opened 4 years ago

egecemkirci commented 4 years ago

I tried pip install scapy-ssl_tls for quick installation. However, I receive an error and I cannot come up with a fix.

`cwd: /tmp/pip-install-r0kr9z_r/scapy-ssl-tls/ Complete output (6 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-r0kr9z_r/scapy-ssl-tls/setup.py", line 31 except AttributeError, ex: ^ SyntaxError: invalid syntax

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.`

I cannot understand the problem because it is supposedly from an invalid syntax. Do you have any ideas?

huangbj16 commented 4 years ago

Easy Solution, use the second installation method, first download the code, then correct the code by deleting ", ex" and the next print line. It will build successfully.

Zeal-Zhu commented 4 years ago

modify File "setup.py" in line 32 except AttributeError, ex -> except AttributeError as ex this should solve it.

dewebdes commented 2 years ago

I know that you update setup.py.... But there is still a possible mistake for most users like me SCAPY has best compatibility with Python2.7 and if you try to install this package or other scapy related repo with python3 then maybe simply faced on various errors...

Then best way to install and use scapy-ssl-tls is:

  1. python2.7 -m pip install -U cryptography
  2. pip2.7 install --pre scapy[basic]
  3. pip2.7 install scapy-ssl_tls
milanraf commented 1 month ago

I report the issue as still present when installing with Python 3.10.12 and pip 22.0.2:

Collected: scapy-ssl_tls-2.0.0.tar.gz

        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-mmji30wr/scapy-ssl-tls_87acac1301f14212a1dbed2d444318f6/setup.py", line 31
          except AttributeError, ex:
                 ^^^^^^^^^^^^^^^^^^
      SyntaxError: multiple exception types must be parenthesized

The source installation method works (scapy-2.4.5.tar.gz is collected) but the following deprecation message is displayed during installation:

setup.py install is deprecated. Use build and pip and other standards-based tools

althought installation completes successfully