Wireshark-dev: Re: [Wireshark-dev] Script extcap on macOS

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 12 Apr 2019 13:31:46 -0700
On Apr 12, 2019, at 1:22 PM, Roland Knall <rknall@xxxxxxxxx> wrote:

> There seems to be an issue on mac, depending how the original Wireshark binary has been called. It seems to be, that by clicking on the icon, the system python interpreter get's loaded, which most certainly will let your script fail.

The script begins with

	#!/usr/bin/env python3

so the only way it should be run by the system Python interpreter - which is not a Python 3 interpreter:

	$ python --version
	Python 2.7.10

would be if it were run by "python {script path}" rather than just trying to run {script path} as an executable image.  (Or if somebody make a "python3" link to "/usr/bin/python", but that would be a very silly thing to do.)

Now, if you *did* install a Python 3 interpreter, but the directory in which it's installed isn't in $PATH - or if it's not installed as python3 - then the attempt to run the script won't work.