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

丶灬走出姿态 提交于 2019-12-13 13:13:02

问题


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


回答1:


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




回答2:


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/



来源:https://stackoverflow.com/questions/16303512/pysnmp-importerror-no-module-named-pyasn1-compat-octets

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!