# snmp\_facts  cannot find pysnmp

**URL:** <https://forum.ansible.com/t/snmp-facts-cannot-find-pysnmp/22800>\
**Category:** Ansible Project\
**Created:** [October 16, 2016, 11:06am UTC](https://forum.ansible.com/t/snmp-facts-cannot-find-pysnmp/22800 "2016-10-16T11:06:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hzj.zh](https://avatars.discourse-cdn.com/v4/letter/h/b9bd4f/32.png) [@hzj.zh](https://forum.ansible.com/u/hzj.zh)\
**Post date:** [October 16, 2016, 11:06am UTC](https://forum.ansible.com/t/snmp-facts-cannot-find-pysnmp/22800/1 "2016-10-16T11:06:40Z")

</div>

hello，

i want to use snmp\_facts module , and i installed the pysnmp,

but everytime i execute the module, returns the error “msg”: “Missing required pysnmp module (check docs)”

i really can not figure it out, need some help;

and i tried to import manully bye command line, there is no error on that:

(AnsibleCmdb) [yd\_hzj@localhost ansible-snmp-facts-master]$ python  
Python 2.7.5 (default, Jul 31 2016, 13:13:56)  
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > from pysnmp.entity.rfc3413.oneliner import cmdgen

here is my playbook output

(AnsibleCmdb) [yd\_hzj@localhost ansible-snmp-facts-master]$ ansible-playbook snmp\_facts-playbook.yml -i 10.223.53.3, -vvv  
Using /home/yd\_hzj/project/rango/ansible/ansible.cfg as config file

PLAYBOOK: snmp\_facts-playbook.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
1 plays in snmp\_facts-playbook.yml

PLAY [10.223.53.3] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Get SNMP information from switches] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /home/yd\_hzj/test/ansible-snmp-facts-master/snmp\_facts-playbook.yml:6  
\<10.223.53.3\> ESTABLISH LOCAL CONNECTION FOR USER: yd\_hzj  
\<10.223.53.3\> EXEC /bin/sh -c ‘LANG=en\_US.UTF-8 LC\_ALL=en\_US.UTF-8 LC\_MESSAGES=en\_US.UTF-8 /usr/bin/python && sleep 0’  
fatal: [10.223.53.3]: FAILED! =\> {“changed”: false, “failed”: true, “invocation”: {“module\_args”: {“authkey”: null, “community”: “aaabbb”, “host”: “10.223.53.3”, “integrity”: null, “level”: null, “privacy”: null, “privkey”: null, “removeplaceholder”: null, “username”: null, “version”: “v2”}, “module\_name”: “snmp\_facts”}, “msg”: “Missing required pysnmp module (check docs)”}

NO MORE HOSTS LEFT \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
to retry, use: --limit @snmp\_facts-playbook.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
10.223.53.3 : ok=0 changed=0 unreachable=0 failed=1
