在centos 6上导入python netsnmp模块时遇到的问题

时间:2019-01-22 06:02:59

标签: python net-snmp

在构建netsnmp python代码时出现“ TabError:缩进中的制表符和空格不一致”错误

[root@localhost shailendra]# pwd
/root/shailendra
[root@localhost shailendra]# wget https://sourceforge.net/projects/net-snmp/files/net-snmp/5.8/net-snmp-5.8.tar.gz/download
[root@localhost shailendra]# tar -zxvf net-snmp-5.8.tar.gz
[root@localhost shailendra]# cd net-snmp-5.8
[root@localhost net-snmp-5.8]#./configure 
[root@localhost net-snmp-5.8]# make
[root@localhost net-snmp-5.8]# make install
[root@localhost net-snmp-5.8]# cd python
[root@localhost python]# python setup.py build
  File "setup.py", line 14
    sys.argv.remove(arg)
                       ^
TabError: inconsistent use of tabs and spaces in indentation
[root@localhost python]#
[root@localhost python]# cd ~
[root@localhost ~]# python
Python 3.6.3 (default, Jul 31 2018, 03:11:06)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] 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'
>>>

如何解决此问题

0 个答案:

没有答案