首页 文章

无法在Python中安装easysnmp

提问于
浏览
1

我正在使用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\

有没有人遇到同样的问题?

1 回答

  • 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

相关问题