无法在Python中使用pysnmp导入名称 DgramSocketTransport

2024-04-30 01:42:04 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经安装了pysnmp:

pip install pysnmp

已安装pysnmp的4.3.2版。当我尝试运行我的脚本时,它的第一行是:

from pysnmp.hlapi import *

我得到以下错误:

File "C:\Python27\lib\site-packages\pysnmp\carrier\asyncore\dgram\udp6.py", line 9, in module
from pysnmp.carrier.asyncore.dgram.base import DgramSocketTransport
ImportError: cannot import name DgramSocketTransport

如果我查看base.py,类DgramSocketTransport就在那里。你知道吗

有什么问题?你知道吗


Tags: installpipfrompyimport脚本base错误