Cannot find getCmd in pysnmp.hlapi

Dear All,

I tried to start simple program by using pysnmp, however I cannot find the getCmd(even other functions) in the library.

My Python version is 3.12.6 with pysnmp 7.0.3(Tried to downgrade to 3.11.9 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 result is the same.

Thank you for your help in advance.

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)

have the same issue… im testing at school SNMP commands, and when i try to run script ist getting issue with getCmd and hlapi

Finally I can use getcmd by referring to
https://docs.lextudio.com/pysnmp/v7.1/docs/hlapi/v1arch/asyncio/manager/cmdgen/getcmd#pysnmp.hlapi.v1arch.asyncio.getCmd

You need to use below

from pysnmp.hlapi.v3arch.asyncio import *
Or
from pysnmp.hlapi.v1arch.asyncio import*

And beware that bulkget is exclusive for SNMP v2c and v3