gpt4 book ai didi

python - 无法在 centos 6.5 的 python 中导入 netsnmp

转载 作者:太空宇宙 更新时间:2023-11-04 03:47:02 25 4
gpt4 key购买 nike

我正在尝试在 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如果安装不正确或缺少任何其他配置,请提供帮助。

最佳答案

要在 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 查询。两者都可以独立工作。

关于python - 无法在 centos 6.5 的 python 中导入 netsnmp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23259930/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com