我是Python新手。我想使用 pysnmp 模块,所以我尝试使用 pip 安装它,但我从中收到错误:
Failed building wheel for pycrypto
Run Code Online (Sandbox Code Playgroud)
我在多个系统(Ubuntu、Debian 和 RH)上尝试过,但总是遇到相同的错误。我如何安装 pysnmp ?或者还有其他替代方法可以将 snmp 与 python 一起使用吗?
外壳命令:
sudo -H pip install pysnmp
Run Code Online (Sandbox Code Playgroud)
结果 :
...
configure: creating ./config.status
config.status: creating src/config.h
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastm ath.
building 'Crypto.Hash._MD2' extension
creating build/temp.linux-x86_64-3.4
creating build/temp.linux-x86_64-3.4/src
x86_64-linux-gnu-gcc -pthread -fwrapv -Wall -Wstrict-prototypes -fstack-prot ector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOUR CE=2 -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python3.4m -c src/MD2.c -o build/temp.linux-x86_64-3.4/src/MD2.o
src/MD2.c:31:20: fatal error: Python.h: No such …Run Code Online (Sandbox Code Playgroud)