Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Trouble importing pyshark module

Writer Emily Wong

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'
6

1 Answer

You need to have tshark installed in the system, for pyshark module to work. Use to install tshark.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy