Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm trying to use PySNMP on windows, but when I try to import cmdgen I see following Error:

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

How can I solve this error, I also don't touched init.py

Thank you

like image 800
Mahdi Avatar asked Apr 30 '13 15:04

Mahdi


2 Answers

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

like image 69
Pooh Avatar answered Nov 19 '22 15:11

Pooh


I met with the same mistake.

I copied the library from this link into the downloaded project dirctory and corrected the error

this link :

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

like image 41
Jealian Avatar answered Nov 19 '22 16:11

Jealian