Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'pysnmp' ; python version : 3.6.8 , OS : Linux : 7.9 [Red Hat Enterprise Linux] #420

Open
tanu-vishwanath opened this issue Apr 27, 2022 · 2 comments

Comments

@tanu-vishwanath
Copy link

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'

@stsojithomas
Copy link

stsojithomas commented Aug 23, 2022

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.

@lextm
Copy link

lextm commented Jan 19, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants