0

Here is my code:

import pyshark
cap = pyshark.LiveCapture(output_file='newOutput')

error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python36\lib\site-packages\pyshark\capture\live_capture.py", line 57, in __init__
    self.interfaces = get_tshark_interfaces(tshark_path)
  File "C:\Program Files\Python36\lib\site-packages\pyshark\tshark\tshark.py", line 138, in get_tshark_interfaces
    parameters = [get_process_path(tshark_path), '-D']
  File "C:\Program Files\Python36\lib\site-packages\pyshark\tshark\tshark.py", line 98, in get_process_path
    'Search these paths: {}'.format(possible_paths)
pyshark.tshark.tshark.TSharkNotFoundException: TShark not found. Try adding its location to the configuration file. Search these paths: ['C:\\Program Files\\Wireshark\\tshark.exe', 'C:\\Program Files (x86)\\Wireshark\\tshark.exe', 'C:\\Program Files\\Wireshark\\tshark.exe']

i am running a windows 10 machine with python 3.6 on it. i have installed wireshark and tshark already (But it's not in its default folder; also i have recorded the path for them in system variables for windows)

1 Answers1

0
sudo apt-get install tshark

does the job for Ubuntu users. Since you're a Windows user, you should install the tshark package.

Pingolin
  • 3,161
  • 6
  • 25
  • 40
Noah
  • 1