简体   繁体   English

python easysnmp packge安装错误窗口。失败,退出状态为2

[英]python easysnmp packge install error windows.. failed with exit status 2

I need to use snmp to get some information from my devices (port statistics, port description etc..) but I'm struggling with some package install error that I didn't find any answers I'm using windows 10 64bit machine and trying to install easysnmp package, but I'm getting the following output: 我需要使用snmp来从设备中获取一些信息(端口统计信息,端口说明等),但是我遇到了一些软件包安装错误,我没有找到任何答案,我正在使用Windows 10 64位计算机并尝试安装easysnmp软件包,但得到以下输出:

> D:\Python36\Scripts>pip.exe install easysnmp
Collecting easysnmp
Using cached easysnmp-0.2.5.tar.gz
Installing collected packages: easysnmp
Running setup.py install for easysnmp ... error
Complete output from command d:\python36\python.exe -u -c "import 
setuptools, 
tokenize;__file__='C:\\Users\\AVISHA~1\\AppData\\Local\\Temp\\pip-
build-9_9zhm70\\easysnmp\\setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', 
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
 C:\Users\AVISHA~1\AppData\Local\Temp\pip-wia8b3wa-record\install-
 record.txt --single-version-externally-managed --compile:
'net-snmp-config' is not recognized as an internal or external command,
 operable program or batch file.
 running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\easysnmp
copying easysnmp\compat.py -> build\lib.win-amd64-3.6\easysnmp
copying easysnmp\easy.py -> build\lib.win-amd64-3.6\easysnmp
copying easysnmp\exceptions.py -> build\lib.win-amd64-3.6\easysnmp
copying easysnmp\helpers.py -> build\lib.win-amd64-3.6\easysnmp
copying easysnmp\session.py -> build\lib.win-amd64-3.6\easysnmp
copying easysnmp\utils.py -> build\lib.win-amd64-3.6\easysnmp
copying easysnmp\variables.py -> build\lib.win-amd64-3.6\easysnmp
copying easysnmp\__init__.py -> build\lib.win-amd64-3.6\easysnmp
running build_ext
building 'easysnmp.interface' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\easysnmp
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\python36\include -Id:\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tceasysnmp/interface.c /Fobuild\temp.win-amd64-3.6\Release\easysnmp/interface.obj -Wno-unused-function
cl : Command line error D8021 : invalid numeric argument '/Wno-unused-function'
*****error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2***** 

Command "d:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\AVISHA~1\\AppData\\Local\\Temp\\pip-build-9_9zhm70\\easysnmp\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\AVISHA~1\AppData\Local\Temp\pip-wia8b3wa-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\AVISHA~1\AppData\Local\Temp\pip-build-9_9zhm70\easysnmp\

*****error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2***** 

I'm afraid I can't answer completely because I've only ever used EasySNMP on Linux machines, but Python's EasySNMP module makes use of Net-SNMP underneath; 恐怕我无法完全回答,因为我只在Linux机器上使用过EasySNMP,但是Python的EasySNMP模块在下面使用了Net-SNMP I daresay you'll need to download and install that first (that's what I've had to do to use it on Linux). 我敢说您首先需要下载并安装它(这是我在Linux上使用它所要做的)。

Best of luck! 祝你好运!

EDIT: A reply to your post cites a duplicate question which refers an issue on the EasySNMP Github explaining that Windows isn't supported by EasySNMP- sorry buddy! 编辑:对您的帖子的回复引用了一个重复的问题, 该问题引用了EasySNMP Github上的一个问题,解释了EasySNMP不支持Windows。 You could give PySNMP a try, I think that's pure-Python (so theoretically platform independent). 您可以尝试一下PySNMP,我认为这是纯Python(因此理论上与平台无关)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows 10:Pip 安装错误:命令出错,退出状态为 1 - Windows 10: Pip install error: Command errored out with exit status 1 Windows Python2.7 mysqldb安装错误退出状态2 - Windows Python2.7 mysqldb installation error exit status 2 运行 gcc 失败:在 windows 的 golang 中退出状态 1 - running gcc failed: exit status 1 in golang in windows Windows:pip install zbar无法打开包含文件,并以退出状态2失败 - windows: pip install zbar cannot open include file and failed with exit status 2 为什么在尝试安装Bower Windows 8.1 Pro时npm会给出状态8退出错误以及如何解决? - Why does npm give status 8 exit error when trying to install bower windows 8.1 Pro, & how to fix? pip install cx_Oracle->失败,退出状态为1120 - pip install cx_Oracle -> failed with exit status 1120 npm 安装错误:`gyp` 失败,退出代码:1 - npm install with error: `gyp` failed with exit code: 1 pystan:CompileError:命令'gcc'失败,退出状态为1(Windows) - pystan: CompileError: command 'gcc' failed with exit status 1 (Windows) Python 2.7.7软件包安装给出Visual C ++ cl.exe错误:命令失败,退出状态为2 - Python 2.7.7 package installation giving Visual C++ cl.exe error: command failed with exit status 2 错误:与`ld`链接失败:退出状态:1 - error: linking with `ld` failed: exit status: 1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM