2016-03-03 229 views
2

這是一個完整的初學者。通過pip安裝easysnmp時出錯[Python]

我一直在試圖爲python安裝easysnmp庫,並且我一直遇到各種與神祕c編譯器相關的錯誤,我解決了它們中的大多數,但是我遇到了一個錯誤,我沒有線索如何解決:(對不起對於巨大的錯誤消息)

Collecting easysnmp 
    Using cached easysnmp-0.2.4.tar.gz 
Building wheels for collected packages: easysnmp 
    Running setup.py bdist_wheel for easysnmp ... error 
    Complete output from command C:\Users\PC\Miniconda2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\PC\\appdata\\local\\temp\\pip-build-fozy8z\\easysnmp\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d c:\users\PC\appdata\local\temp\tmpieeeempip-wheel- --python-tag cp27: 
    running bdist_wheel 
    running build 
    running build_py 
    creating build 
    creating build\lib.win-amd64-2.7 
    creating build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\compat.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\easy.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\exceptions.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\helpers.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\session.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\utils.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\variables.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\__init__.py -> build\lib.win-amd64-2.7\easysnmp 
    running build_ext 
    building 'easysnmp.interface' extension 
    creating build\temp.win-amd64-2.7 
    creating build\temp.win-amd64-2.7\Release 
    creating build\temp.win-amd64-2.7\Release\easysnmp 
    C:\Users\PC\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Users\PC\Miniconda2\include -IC:\Users\PC\Miniconda2\PC /Tceasysnmp/interface.c /Fobuild\temp.win-amd64-2.7\Release\easysnmp/interface.obj -Wno-unused-function 
    cl : Command line error D8021 : invalid numeric argument '/Wno-unused-function' 
    error: command 'C:\\Users\\PC\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2 

    ---------------------------------------- 
    Failed building wheel for easysnmp 
    Running setup.py clean for easysnmp 
Failed to build easysnmp 
Installing collected packages: easysnmp 
    Running setup.py install for easysnmp ... error 
    Complete output from command C:\Users\PC\Miniconda2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\PC\\appdata\\local\\temp\\pip-build-fozy8z\\easysnmp\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\PC\appdata\local\temp\pip-lsjd2u-record\install-record.txt --single-version-externally-managed --compile: 
    running install 
    running build 
    running build_py 
    creating build 
    creating build\lib.win-amd64-2.7 
    creating build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\compat.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\easy.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\exceptions.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\helpers.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\session.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\utils.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\variables.py -> build\lib.win-amd64-2.7\easysnmp 
    copying easysnmp\__init__.py -> build\lib.win-amd64-2.7\easysnmp 
    running build_ext 
    building 'easysnmp.interface' extension 
    creating build\temp.win-amd64-2.7 
    creating build\temp.win-amd64-2.7\Release 
    creating build\temp.win-amd64-2.7\Release\easysnmp 
    C:\Users\PC\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Users\PC\Miniconda2\include -IC:\Users\PC\Miniconda2\PC /Tceasysnmp/interface.c /Fobuild\temp.win-amd64-2.7\Release\easysnmp/interface.obj -Wno-unused-function 
    cl : Command line error D8021 : invalid numeric argument '/Wno-unused-function' 
    error: command 'C:\\Users\\PC\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2 

    ---------------------------------------- 
Command "C:\Users\PC\Miniconda2\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\PC\\appdata\\local\\temp\\pip-build-fozy8z\\easysnmp\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\PC\appdata\local\temp\pip-lsjd2u-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\PC\appdata\local\temp\pip-build-fozy8z\easysnmp 

林不完全肯定,如果錯誤是有關C編譯器或事做與庫本身,或者也可以是在兩者之間,我真的可以使用一些幫助。

在此先感謝

+0

您是否安裝了用於Python 2.7的Microsoft Visual C++編譯器? –

+0

@ lord63.j是的,安裝它 – Daedalus

回答

1

不幸的是,在這個時候,Easysnmp Windows兼容。這已在issue #32中確認,該文件已於2016年2月28日關閉。