Comments (12)
Is it possible to merge the fix to the version provided via pip? test version is working fine, but if you install from pip on macos, it still fails
thanks for the library and mutli OS support
from easysnmp.
Ok, I've merged the necessary changes into the "test" branch. I've also added a patch that re-enables Net-SNMP 5.6.2.1 support on macOS. You can choose to use the Brew Net-SNMP or system-included Net-SNMP library. (If you need modern SSL cipher support, go with Brew).
from easysnmp.
Unfortunately, the project looks like it has been abandoned. I wonder if there are any alternatives (other than the abandoned PySNMP)?
from easysnmp.
Looks like you're experiencing an issue with library resolution due to how the old method of extracting info from brew
was being performed.
Please try the following and report back on whether or not it installs correctly:
pip install https://github.com/easysnmp/easysnmp/archive/testing.zip
from easysnmp.
If you mean the URL https://github.com/easysnmp/easysnmp/archive/refs/heads/test.zip here is the result:
Collecting https://github.com/easysnmp/easysnmp/archive/refs/heads/test.zip
Using cached https://github.com/easysnmp/easysnmp/archive/refs/heads/test.zip
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [11 lines of output]
Error: No such keg: /opt/homebrew/Cellar/net-snmp
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/1x/j7f60dtd3qlbg3vtd6r0zqlh0000gn/T/pip-req-build-76hjuwqn/setup.py", line 66, in <module>
brew = check_output('brew list net-snmp', shell=True).decode()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'brew list net-snmp' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I have net-snmp installed without using homebrew.
> brew list net-snmp
Error: No such keg: /opt/homebrew/Cellar/net-snmp
> pkgutil --file-info /usr/bin/snmpwalk
volume: /
path: /usr/bin/snmpwalk
> snmpbulkwalk --version
NET-SNMP version: 5.6.2.1
from easysnmp.
If you mean the URL https://github.com/easysnmp/easysnmp/archive/refs/heads/test.zip
That's correct; sorry for the bad URL.
× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [11 lines of output] Error: No such keg: /opt/homebrew/Cellar/net-snmp
Brew is certainly installed. The keg Net-SNMP does not appear to be.
> snmpbulkwalk --version NET-SNMP version: 5.6.2.1
Are you using the system-included Net-SNMP binaries/library? If so, we highly recommend using the Homebrew package instead as this will include some memory leak fixes and newer OpenSSL support. brew update && brew install net-snmp
is all you'd need to run before trying to install EasySNMP again.
If you cannot install Net-SNMP via brew for some reason (security restrictions, explicit Net-SNMP library version required, etc), please let us know why.
from easysnmp.
Result after installation using the homebrew:
Collecting https://github.com/easysnmp/easysnmp/archive/refs/heads/test.zip
Using cached https://github.com/easysnmp/easysnmp/archive/refs/heads/test.zip
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
running egg_info
creating /private/var/folders/1x/j7f60dtd3qlbg3vtd6r0zqlh0000gn/T/pip-pip-egg-info-eiwu2fvq/easysnmp.egg-info
writing /private/var/folders/1x/j7f60dtd3qlbg3vtd6r0zqlh0000gn/T/pip-pip-egg-info-eiwu2fvq/easysnmp.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/1x/j7f60dtd3qlbg3vtd6r0zqlh0000gn/T/pip-pip-egg-info-eiwu2fvq/easysnmp.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/1x/j7f60dtd3qlbg3vtd6r0zqlh0000gn/T/pip-pip-egg-info-eiwu2fvq/easysnmp.egg-info/top_level.txt
writing manifest file '/private/var/folders/1x/j7f60dtd3qlbg3vtd6r0zqlh0000gn/T/pip-pip-egg-info-eiwu2fvq/easysnmp.egg-info/SOURCES.txt'
reading manifest file '/private/var/folders/1x/j7f60dtd3qlbg3vtd6r0zqlh0000gn/T/pip-pip-egg-info-eiwu2fvq/easysnmp.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file '/private/var/folders/1x/j7f60dtd3qlbg3vtd6r0zqlh0000gn/T/pip-pip-egg-info-eiwu2fvq/easysnmp.egg-info/SOURCES.txt'
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: build/lib.macosx-10.9-universal2-3.10/easysnmp/interface.cpython-310-darwin.so (No such file or directory)
Usage: /Library/Developer/CommandLineTools/usr/bin/install_name_tool [-change old new] ... [-rpath old new] ... [-add_rpath new] ... [-delete_rpath old] ... [-id name] input
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/1x/j7f60dtd3qlbg3vtd6r0zqlh0000gn/T/pip-req-build-wm8keu6u/setup.py", line 172, in <module>
_ = check_output(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'install_name_tool -change /opt/homebrew/Cellar/net-snmp/5.9.3/lib/libnetsnmp.dylib build/lib.macosx-10.9-universal2-3.10/easysnmp/interface.cpython-310-darwin.so' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
from easysnmp.
What output do you get when you run brew list net-snmp
?
from easysnmp.
What output do you get when you run
brew list net-snmp
?
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/agentxtrap
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/checkbandwidth
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/encode_keychange
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/fixproc
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/ipf-mod.pl
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/mib2c
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/mib2c-update
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/net-snmp-cert
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/net-snmp-config
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/net-snmp-create-v3-user
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmp-bridge-mib
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpbulkget
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpbulkwalk
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpcheck
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpconf
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpdelta
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpdf
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpget
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpgetnext
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpinform
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpnetstat
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmppcap
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpping
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpps
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpset
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpstatus
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmptable
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmptest
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmptop
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmptranslate
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmptrap
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpusm
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpvacm
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/snmpwalk
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/tkmib
/opt/homebrew/Cellar/net-snmp/5.9.3/bin/traptoemail
/opt/homebrew/Cellar/net-snmp/5.9.3/include/net-snmp/ (183 files)
/opt/homebrew/Cellar/net-snmp/5.9.3/lib/libnetsnmp.40.dylib
/opt/homebrew/Cellar/net-snmp/5.9.3/lib/libnetsnmpagent.40.dylib
/opt/homebrew/Cellar/net-snmp/5.9.3/lib/libnetsnmphelpers.40.dylib
/opt/homebrew/Cellar/net-snmp/5.9.3/lib/libnetsnmpmibs.40.dylib
/opt/homebrew/Cellar/net-snmp/5.9.3/lib/libnetsnmptrapd.40.dylib
/opt/homebrew/Cellar/net-snmp/5.9.3/lib/pkgconfig/ (2 files)
/opt/homebrew/Cellar/net-snmp/5.9.3/lib/ (10 other files)
/opt/homebrew/Cellar/net-snmp/5.9.3/sbin/snmpd
/opt/homebrew/Cellar/net-snmp/5.9.3/sbin/snmptrapd
/opt/homebrew/Cellar/net-snmp/5.9.3/share/man/ (134 files)
/opt/homebrew/Cellar/net-snmp/5.9.3/share/snmp/ (174 files)
from easysnmp.
Ah ok, I missed an important detail from your output after installing Net-SNMP via Brew.
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: build/lib.macosx-10.9-universal2-3.10/easysnmp/interface.cpython-310-darwin.so (No such file or directory)
I'm able to replicate this on my 12.5 VM. I'll dive into it.
from easysnmp.
Looks like the issue is due to pip running the egg_info
command and the setup.py
script performing a library link regardless of what command is passed in. I'll probably need to look into extending the build_ext
/build
commands so that this step only occurs when the C extension is built. Hopefully I can have it patched by Monday.
from easysnmp.
Now the installation (from test) runs correctly. Thank you very much!
from easysnmp.
Related Issues (20)
- [BUG] macOS compilation fails due to improper setup.py logic
- [PROPOSAL] Drop Python 2 support HOT 1
- [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
- [BUG] Failing installation on M3 MacBook MacOS 14.4 HOT 4
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.