windows上安装python的netsnmp模块太难了_pip3 install python3-netsnmp 安装失败

在Windows上使用pip3安装python3-netsnmp模块时遇到错误,提示需要Microsoft Visual C++ 14.0。安装过程失败,建议用户参考相关解决方案,如安装Microsoft Visual C++ Build Tools。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

用户提问

C:\Users\Administrator>pip3 install python3-netsnmp

Collecting python3-netsnmp

Using cached https://files.pythonhosted.org/packages/da/b3/d6c8236116150ab8194

849786b4bdb99c96b86bc15ff344d9971a9e910a6/python3-netsnmp-1.1a1.tar.gz

Installing collected packages: python3-netsnmp

Running setup.py install for python3-netsnmp ... error

ERROR: Command errored out with exit status 1:

command: 'c:\users\administrator\appdata\local\programs\python\python37-32\

python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\User

s\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-8saeao25\\python3-netsnmp\\setup.

py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-8s

aeao25\\python3-netsnmp\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)

(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(co

mpile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ADMINI~1\AppD

ata\Local\Temp\pip-record-vsg212wi\install-record.txt' --single-version-external

ly-managed --compile

cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-8saeao25\python3-

netsnmp\

Complete output (16 lines):

'net-snmp-config' 不是内部或外部命令,也不是可运行的程序

或批处理文件。

running install

running build

running build_py

creating build

creating build\lib.win32-3.7

creating build\lib.win32-3.7\netsnmp

copying netsnmp\client.py -> build\lib.win32-3.7\netsnmp

copying netsnmp\__init__.py -> build\lib.win32-3.7\netsnmp

creating build\lib.win32-3.7\netsnmp\tests

copying netsnmp\tests\test.py -> build\lib.win32-3.7\netsnmp\tests

copying netsnmp\tests\__init__.py -> build\lib.win32-3.7\netsnmp\tests

running build_ext

building 'netsnmp.client_intf' extension

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual

C++ Build Tools": https://visualstudio.microsoft.com/downloads/

----------------------------------------

ERROR: Command errored out with exit status 1: 'c:\users\administrator\appdata\l

ocal\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, toke

nize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-

8saeao25\\python3-netsnmp\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\App

Data\\Local\\Temp\\pip-install-8saeao25\\python3-netsnmp\\setup.py'"'"';f=getatt

r(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"'

, '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install

--record 'C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-vsg212wi\install-reco

rd.txt' --single-version-externally-managed --compile Check the logs for full co

mmand output.

辅助答案

用户:454592673

2019年08月25日

建议参照这个办法解决网页链接

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值