Open jhonyfre opened 8 months ago
You might read #429 and https://github.com/lextudio/pysnmp/issues/10
I solve them by changing the site-packages\pysnmp\smi\builder.py
try:
import importlib
import importlib.util
import importlib.machinery
try:
PY_MAGIC_NUMBER = importlib.util.MAGIC_NUMBER
SOURCE_SUFFIXES = importlib.machinery.SOURCE_SUFFIXES
BYTECODE_SUFFIXES = importlib.machinery.BYTECODE_SUFFIXES
except Exception:
raise ImportError()
except ImportError:
import imp
As far as we know 4.4.12 has many known issues with Python 3.10+, so you will have to patch it in more places if that's your choice.
We announced our plan to take over the ecosystem in #429, and you can see projects like OpenStack and Home Assistant have already switched to our fork.
Hello, I'm trying to user pysnmp with SNMPv3 but I always get this error:
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\ramirezjh\AppData\Local\Programs\Python\Python312\Lib\site-packages\pysnmp\smi\builder.py", line 23, in
raise ImportError()
ImportError
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 1, in
File "C:\Users\ramirezjh\AppData\Local\Programs\Python\Python312\Lib\site-packages\pysnmp\hlapi__init__.py", line 9, in
from pysnmp.smi.rfc1902 import *
File "C:\Users\ramirezjh\AppData\Local\Programs\Python\Python312\Lib\site-packages\pysnmp\smi\rfc1902.py", line 10, in
from pysnmp.smi.builder import ZipMibSource
File "C:\Users\ramirezjh\AppData\Local\Programs\Python\Python312\Lib\site-packages\pysnmp\smi\builder.py", line 26, in
import imp
ModuleNotFoundError: No module named 'imp'
I updated python and now I'm using Python 3.12.0 and this version of pysnmp Name: pysnmp Version: 4.4.12 Summary: SNMP library for Python Home-page: https://github.com/etingof/pysnmp Author: Ilya Etingof Author-email: etingof@gmail.com License: BSD Location: C:\Users\ramirezjh\AppData\Local\Programs\Python\Python312\Lib\site-packages Requires: pyasn1, pycryptodomex, pysmi Required-by: pysnmp-mibs