Download PySNMP¶
The PySNMP software is provided under terms and conditions of BSD-style license, and can be freely downloaded from PyPI or GitHub (main branch).
Besides official releases, it’s advisable to try the cutting-edge development code that could be taken from PySNMP source code repository. It may be less stable in regards to general operation and changes to public interfaces, but it’s first to contain fixes to recently discovered bugs.
The best way to obtain PySNMP and dependencies is to run:
$ pip install pysnmplib
In case you are installing PySNMP on an off-line system, the following packages need to be downloaded and installed for PySNMP to become operational:
PyASN1, used for handling ASN.1 objects
PySNMP, SNMP engine implementation
PyCryptodomex, used by SNMPv3 crypto features. It is a declared dependency, but its ciphers are imported lazily: SNMPv1, SNMPv2c and the SNMPv3 noAuthNoPriv and authNoPriv security levels work without it installed.
Optional, and installed by asking for the compile extra:
$ pip install 'pysnmplib[compile]'
PySMI for automatic MIB download and compilation. That helps visualizing more SNMP objects
Ply, parser generator required by PySMI
PySMI is not a required dependency. PySNMP ships a rendering of the standard
modules an engine resolves while starting up and while being configured, so
SNMPv1, SNMPv2c, SNMPv3 and name resolution all work without it. What the extra
buys is compiling ASN.1 MIB sources at run time; ask for a MIB compiler without
it and SmiError is raised, naming the missing
import.
Install previously downloaded packages with pip, for example:
$ python -m pip install --no-index --find-links /path/to/packages pysnmplib
In case of any issues, please open a GitHub issue so we could try to help out.