【问题标题】:cant import netsnmp in python on centos 6.5无法在centos 6.5上的python中导入netsnmp
【发布时间】:2014-04-24 21:45:47
【问题描述】:

我正在尝试在 python 中使用 netsnmp,但在遵循与 python 中的 netsnmp 相关的所有建议后,它无法导入。我使用以下命令安装了 netsnmp

yum install net-snmp net-snmp-utils
easy_install ipython

snmpd 服务正在运行。 它仍然抛出这个错误

ImportError: No module named netsnmp

我正在使用 Cent os 6.5 和 Python 版本 2.6.6 如果安装不正确或缺少任何其他配置,请提供帮助。

【问题讨论】:

  • 需要安装net-snmp-python包。

标签: python centos net-snmp


【解决方案1】:

要在 python 中导入 netsnmp,只需要 net-snmp-python 两个 net-snmp net-snmp-utils 都可以删除。 所以就

yum install net-snmp-python

可以在 Cent os 6.5 上将 netsnmp 库导入 python

yum install net-snmp net-snmp-utils

将启用来自 Linux 终端的 SNMP 查询。 两者都可以独立工作。

【讨论】:

    猜你喜欢
    • 2014-06-25
    • 2016-09-17
    • 1970-01-01
    • 1970-01-01
    • 2014-12-15
    • 1970-01-01
    • 2014-11-15
    • 2016-10-15
    • 2014-02-11
    相关资源
    最近更新 更多