ktbyers / pynet

Python for Network Engineers
Apache License 2.0
584 stars 513 forks source link

Python2/3 - ImportError: No module named snmp_helper #11

Closed mathewfer closed 6 years ago

mathewfer commented 6 years ago

Hi,

I tried this SNMPv3 part and I get the below import error.

Any idea what is the python module missing in my system? I use Ubuntu 16.04.

ython 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information.

from snmp_helper import snmp_get_oid_v3,snmp_extract Traceback (most recent call last): File "", line 1, in ImportError: No module named 'snmp_helper'

Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.

from snmp_helper import snmp_get_oid_v3,snmp_extract Traceback (most recent call last): File "", line 1, in ImportError: No module named snmp_helper

Mathew

ktbyers commented 6 years ago

You need to install it:

https://raw.githubusercontent.com/ktbyers/pynet/master/snmp/snmp_helper.py

Create a file named snmp_helper.py in the same directory as your script and copy-paste the content from the above URL. I never created an installer for it.

Kirk