我想运行这段代码:
import pyshark
file_path = '/Users/name/Desktop/exmp.pcapng'
cap = pyshark.FileCapture(file_path)
print(cap[0])
但是,我收到此消息:
pyshark.tshark.tshark.TSharkNotFoundException: TShark not found. Try adding its location to the configuration file. Searched these paths: ['C:\\Program Files\\Wireshark\\tshark.exe', '/usr/bin/tshark', '/bin/tshark', '/usr/sbin/tshark', '/sbin/tshark']
如果我在终端上搜索路径,这就是我得到的:
echo $PATH
/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS
如何将tshark路径改为wireshark的路径?