I tried to start a simple program in Win10 by using Python with pysnmp
, however, always showing error message about cannot find getCmd. I also created program(not relatd to pysnmp) of checking mouse cursor xy co-ordinates, so I think the installation and setting for Python should be okay,
My Python version is 3.12.6 with pysnmp 7.0.3(Tried to downgrade to 3.11.9/3.10.x and pysnmp 4.x.x.x. But still cannot)
init.py
is only 1KB not sure is normal or not
Delete and re-install the program also doesn’t help.
Below it the error message.
(myenv) c:>python
Python 3.12.6 (tags/v3.12.6:a4a2d2b, Sep 6 2024, 20:11:23) [MSC v.1940 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
from pysnmp.hlapi import getCmd, SnmpEngine, CommunityData, UdpTransportTarget, ContextData, ObjectType, ObjectIdentity
Traceback (most recent call last):
File “”, line 1, in
ImportError: cannot import name ‘getCmd’ from ‘pysnmp.hlapi’ (unknown location)
3