PySNMP: ImportError: no module named pyasn1.compat.octets

I try to use PySNMP for Windows, but when I try to import cmdgen, I see the following error:

from pysnmp.entity.rfc3413.oneliner import cmdgen ImportError: No module named pyasn1.compat.octets 

How can I solve this error, I also did not touch init.py

thanks

+4
source share
2 answers

Make sure the latest pyasn1 package is installed on your system for the same version of Python as pysnmp.

+3
source

I met the same error.

I copied the library from this link to the downloaded dirctory project and fixed the error

this link:

https://pypi.python.org/pypi/pyasn1/

+1
source

All Articles