| 
 | 
 
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册  
 
x
 
各位鱼油 
          我想问个问题,我在CentOS7安装完Python3后,想使用netsnmp这个工具,但那是我经过各种坎坷安装成功以后,发现Python2没有问题,Python3无法使用,请问各位鱼油,有没有类似的经验,求教。 
实验目的:是为了使用Python做设备巡检,如路由器,交换机,服务器等等。 
 
截图 
[root@localhost ~]# python3 
Python 3.7.3 (default, Jun 21 2019, 17:08:14)  
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import netsnmp 
Traceback (most recent call last): 
  File "<stdin>", line 1, in <module> 
ModuleNotFoundError: No module named 'netsnmp' 
>>>  
[root@localhost ~]# python 
Python 2.7.5 (default, Jun 20 2019, 20:27:34)  
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import netsnmp 
>>> 
pip3 install python3-netsnmp
 
项目地址 
https://pypi.org/project/python3-netsnmp/  
 
 
 |   
 
 
 
 |