【发布时间】:2015-02-15 14:10:30
【问题描述】:
我想在使用 python 时编写以太网数据包捕获。 我谷歌搜索,发现我应该使用 Pcap 库或 PyShark,但我尝试导入 pcap,它说找不到模块名称 Pcap,所以我尝试使用 PyShark 实例,但它在 Python shell 上显示如下
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import pyshark
File "D:\Python27\lib\site-packages\pyshark-0.3.3-py2.7.egg\pyshark\__init__.py", line 1, in <module>
from pyshark.capture.live_capture import LiveCapture
File "D:\Python27\lib\site-packages\pyshark-0.3.3-py2.7.egg\pyshark\capture\live_capture.py", line 1, in <module>
from pyshark.capture.capture import Capture
File "D:\Python27\lib\site-packages\pyshark-0.3.3-py2.7.egg\pyshark\capture\capture.py", line 7, in <module>
import trollius as asyncio
ImportError: No module named trollius
关于这个问题,我该怎么办? 如何将库导入 python?
操作系统为 Windows 8.1 和 Python 版本 2.7.9
【问题讨论】:
标签: python python-2.7 import capture ethernet