我正在使用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\
有没有人遇到同样的问题?
答案 0 :(得分:0)
使用虚拟环境并尝试以下操作:
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
答案 1 :(得分:0)
您需要安装 在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