Comments (7)
Paging @kamakazikamikaze , I am also experiencing this. Can you enlighten us as to how we should be installing this package from source like this?
from easysnmp.
Try this:
pip uninstall easysnmp
pip install git+https://github.com/kamakazikamikaze/easysnmp.git
from easysnmp.
That works, but why? Sort of confusing that git works but a local install won't.
from easysnmp.
I believe it has to do with the dependencies. Easy SNMP is built on top of NET-SNMP. If you check your versions snmpget --version
NET-SNMP may have changed.
from easysnmp.
Similar experience, Python 3.6 / Miniconda / NetSNMP 5.7.3:
(cenv) [collector@monitoring portal]$python3.6
Python 3.6.3 |Anaconda, Inc.| (default, Nov 20 2017, 20:41:42)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from easysnmp import Session
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/collector/miniconda3/lib/python3.6/site-packages/easysnmp/__init__.py", line 1, in <module>
from .easy import ( # noqa
File "/home/collector/miniconda3/lib/python3.6/site-packages/easysnmp/easy.py", line 3, in <module>
from .session import Session
File "/home/collector/miniconda3/lib/python3.6/site-packages/easysnmp/session.py", line 8, in <module>
from . import interface
ImportError: /home/collector/miniconda3/lib/python3.6/site-packages/easysnmp/interface.cpython-36m-x86_64-linux-gnu.so: undefined symbol: usmAESPrivProtocol
Note the interface.cpython-36m-x86_64-linux-gnu.so library does not have a dependency on libnetsnmp.so, which contains the symbol:
(cenv) [collector@monitoring portal]$ldd /home/collector/miniconda3/lib/python3.6/site-packages/easysnmp/interface.cpython-36m-x86_64-linux-gnu.so
linux-vdso.so.1 => (0x00007fff3b7ff000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fda2432f000)
libc.so.6 => /lib64/libc.so.6 (0x00007fda23f9a000)
/lib64/ld-linux-x86-64.so.2 (0x00000034c0400000)
(cenv) [collector@monitoring portal]$nm -ng /usr/local/lib/libnetsnmp.so | grep usmAESPrivProtocol
00000000002a5b60 D usmAESPrivProtocol
Tracing this back to installation:
(cenv) [collector@monitoring portal]$pip install easysnmp -v --no-cache-dir | more
Collecting easysnmp
...
/bin/sh: net-snmp-config: command not found <======
Is there a reason 'pip install' does not fail at this point?
Thank you
Tim
from easysnmp.
This may not be helpful to anyone else, but I'll leave a breadcrumb:
I had the same issue trying to package this on NixOS. The solution was:
{
postFixup = ''
patchelf --add-needed ${pkgs.net_snmp}/lib/libnetsnmp.so "$out/${python.sitePackages}/easysnmp/"*cpython*.so
'';
}
Again, it's only strictly useful for NixOS, but maybe it can give someone a hint if they run into the same problem packaging easysnmp on another distro.
from easysnmp.
Update: A simpler solution turned out to be using the --basedir=
flag to specify the location of the net-snmp-config
executable. (Which for me would be ${pkgs.net_snmp}/bin
)
from easysnmp.
Related Issues (20)
- [BUG] Seg fault in interface.c:py_netsnmp_attr_string HOT 1
- [BUG] macOS compilation fails due to improper setup.py logic
- [PROPOSAL] Drop Python 2 support HOT 1
- Cannot install MacOS 12.5 (M1 ARM64) HOT 12
- [BUG] SIGSEGV if type not set in snmp_set() HOT 3
- [BUG] Unable to set 64 bit integer on 32 bit ARM device HOT 10
- Possible Memory Leak Using Session API HOT 4
- [BUG] HOT 2
- [FEATURE] Support 16bitIDs in sessions
- failed to install/compile with pip on debian11 [BUG]
- How to install easysnmp with net-snmp installed in /opt/netsnmp HOT 1
- [BUG] Unsupported privacy protocol DES
- [FEATURE] Python 3.11 support
- [BUG] DeprecationWarning future library HOT 1
- [FEATURE] Read the Docs Action required - Add a configuration file to your project to prevent build failures
- [BUG] MacOS install fatal error: 'openssl/ossl_typ.h' file not found HOT 1
- Please support apple silicon[FEATURE] HOT 1
- Cant install easysnmp using pip3.11 in RHEL 7.9 HOT 3
- [BUG] Empty string in second argument for `set` results in segmentation fault HOT 1
- [BUG] When installing easysnmp 0.2.6 using pip and wheel, current algos introduced with 0.2.6 are not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easysnmp.