[英]Unable to install easysnmp in Python
我正在使用 Windows 机器进行 Python 开发。
当我尝试pip install easysnmp
它抛出一个错误:
Failed building wheel for easysnmp
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\infini~1\\appdata\\local\\temp\\pip-build-r_bb9x\\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\infini~1\appdata\local\temp\pip-0jzdkr-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\infini~1\appdata\local\temp\pip-build-r_bb9x\easysnmp\
有没有人遇到过同样的问题?
使用虚拟环境并尝试以下操作:
sudo apt-get install build-essential libperl-dev python-dev python-pip
cd /tmp
wget https://sourceforge.net/projects/net-snmp/files/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz/
cd net-snmp*
./configure
make
sudo make install
download netsnmp and unpack it
sudo pip install easysnmp
您需要在 Debian / Ubuntu 系统上安装:
sudo apt-get install libsnmp-dev snmp-mibs-downloader
还有
sudo apt-get install gcc python-dev
然后尝试
pip install easysnmp or pip3 install easysnmp
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.