AcePilotWarhawk
AcePilotWarhawk

Reputation: 41

Trouble importing pyshark module

My current project involves receiving data packets from an external IP device and displaying/using the data with python. I am currently trying to use pyshark to extract this data, but am running into the error message 'no module named pyshark.' I have installed all the necessary support packages as far as i have read (lxml, py, trollius, logbook, were included with original package as far as my knowledge goes)

I am very new to IP/TCP data, and from my research on the topic, this code should at least run past line 1:

import pyshark
cap = pyshark.FileCapture('http.cap')

print(cap[0])

Is there perhaps something i am missing or looking over? I feel this issue may be a very easy solution :) Any help on this problem and even any help on interpreting the incoming data packets would also be fantastic. Thank you!

python -m pip --version yields pip 20.0.2 and running sys.version yields 3.8.1

complete error message:

Traceback (most recent call last):
  File "C:/ABWorkingFiles/Kairos/2020_Mar17/systemVersion.py", line 3, in <module>
    import pyshark
ModuleNotFoundError: No module named 'pyshark'

Upvotes: 0

Views: 6741

Answers (1)

dvs
dvs

Reputation: 519

You need to have tshark installed in the system, for pyshark module to work. Use https://tshark.dev/setup/install/ to install tshark.

Upvotes: 1

Related Questions