You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run a script to send a trap from Linux server, however even though pysnmp is installed in "/usr/local/lib/python3.9/site-packages" . When trying to execute the script I am facing following issue.
[root@trapgen ~]# python3 snmp_test.py
Traceback (most recent call last):
File "snmp_test.py", line 1, in
from pysnmp.hlapi import *
ModuleNotFoundError: No module named 'pysnmp'
The text was updated successfully, but these errors were encountered:
Try which python3
to see if it uses the same python that you using to execute the python script as where pysnmp is installed.
From there on, you can use pip (or pip3) list command to see if the module is properly installed.
Since it's common to install multiple copies of Python on a machine, you should be careful to validate the actual environment by running python3 -m pip list to check PySNMP presence, not just something under /usr/local/lib/python3.9/site-packages.
I am trying to run a script to send a trap from Linux server, however even though pysnmp is installed in "/usr/local/lib/python3.9/site-packages" . When trying to execute the script I am facing following issue.
[root@trapgen ~]# python3 snmp_test.py
Traceback (most recent call last):
File "snmp_test.py", line 1, in
from pysnmp.hlapi import *
ModuleNotFoundError: No module named 'pysnmp'
The text was updated successfully, but these errors were encountered: