Python模块windows安装

Python模块windows安装,python,windows,python-module,Python,Windows,Python Module,我需要在我的项目中使用netifaces模块,但我无法获得它。 我尝试通过easy_install安装源代码,但每次收到以下消息: 错误:找不到vcvarsall.bat 我读了一些关于这个错误的答案,但我无法理解 是否有netifaces的编译版本或安装程序? 非常感谢 编辑1: 安装VisualStudioC++后,我得到这个错误。有帮助吗? Searching for netifaces Reading https://pypi.python.org/simple/netifaces/ R

我需要在我的项目中使用netifaces模块,但我无法获得它。 我尝试通过easy_install安装源代码,但每次收到以下消息:

错误:找不到vcvarsall.bat

我读了一些关于这个错误的答案,但我无法理解

是否有netifaces的编译版本或安装程序? 非常感谢

编辑1: 安装VisualStudioC++后,我得到这个错误。有帮助吗?
Searching for netifaces
Reading https://pypi.python.org/simple/netifaces/
Reading http://alastairs-place.net/netifaces
Reading http://alastairs-place.net/projects/netifaces
Best match: netifaces 0.8
Downloading http://alastairs-place.net/projects/netifaces/netifaces-0.8.tar.gz
Processing netifaces-0.8.tar.gz
Writing c:\users\daniel\appdata\local\temp\easy_install-gkcl9j\netifaces-0.8\setup.cfg
Running netifaces-0.8\setup.py -q bdist_egg --dist-dir c:\users\daniel\appdata\local\temp\easy_install-gkcl9j\netifaces-0.8\egg-dist-tmp-wuxsjm
netifaces.c
netifaces.c(406) : error C2275: 'PyObject' : illegal use of this type as an expression
        c:\python27\include\object.h(108) : see declaration of 'PyObject'
netifaces.c(406) : error C2065: 'py_family' : undeclared identifier
netifaces.c(407) : error C2275: 'PyObject' : illegal use of this type as an expression
        c:\python27\include\object.h(108) : see declaration of 'PyObject'
netifaces.c(407) : error C2065: 'list' : undeclared identifier
netifaces.c(407) : error C2065: 'py_family' : undeclared identifier
netifaces.c(407) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
netifaces.c(407) : warning C4024: 'PyDict_GetItem' : different types for formal and actual parameter 2
netifaces.c(409) : error C2065: 'py_family' : undeclared identifier
netifaces.c(411) : error C2065: 'list' : undeclared identifier
netifaces.c(411) : warning C4047: '==' : 'int' differs in levels of indirection from 'void *'
netifaces.c(411) : error C2065: 'list' : undeclared identifier
netifaces.c(411) : error C2065: 'list' : undeclared identifier
netifaces.c(411) : error C2065: 'list' : undeclared identifier
netifaces.c(415) : error C2065: 'list' : undeclared identifier
netifaces.c(416) : error C2065: 'list' : undeclared identifier
netifaces.c(416) : warning C4047: '=' : 'int' differs in levels of indirection from 'PyObject *'
netifaces.c(417) : error C2065: 'list' : undeclared identifier
netifaces.c(419) : error C2065: 'py_family' : undeclared identifier
netifaces.c(419) : error C2065: 'py_family' : undeclared identifier
netifaces.c(419) : error C2065: 'py_family' : undeclared identifier
netifaces.c(423) : error C2065: 'list' : undeclared identifier
netifaces.c(424) : error C2065: 'py_family' : undeclared identifier
netifaces.c(424) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
netifaces.c(424) : warning C4024: 'PyDict_SetItem' : different types for formal and actual parameter 2
netifaces.c(424) : error C2065: 'list' : undeclared identifier
netifaces.c(424) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
netifaces.c(424) : warning C4024: 'PyDict_SetItem' : different types for formal and actual parameter 3
netifaces.c(425) : error C2065: 'list' : undeclared identifier
netifaces.c(425) : error C2065: 'list' : undeclared identifier
netifaces.c(425) : error C2065: 'list' : undeclared identifier
netifaces.c(427) : error C2065: 'list' : undeclared identifier
netifaces.c(427) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
netifaces.c(427) : warning C4024: 'PyList_Append' : different types for formal and actual parameter 1
netifaces.c(716) : error C2275: 'PyObject' : illegal use of this type as an expression
        c:\python27\include\object.h(108) : see declaration of 'PyObject'
netifaces.c(716) : error C2065: 'dict' : undeclared identifier
netifaces.c(718) : error C2065: 'dict' : undeclared identifier
netifaces.c(718) : warning C4047: '=' : 'int' differs in levels of indirection from 'PyObject *'
netifaces.c(720) : error C2065: 'dict' : undeclared identifier
netifaces.c(730) : error C2065: 'dict' : undeclared identifier
netifaces.c(730) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
netifaces.c(730) : warning C4024: 'PyDict_SetItemString' : different types for formal and actual parameter 1
netifaces.c(732) : error C2065: 'dict' : undeclared identifier
netifaces.c(732) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
netifaces.c(732) : warning C4024: 'PyDict_SetItemString' : different types for formal and actual parameter 1
netifaces.c(734) : error C2065: 'dict' : undeclared identifier
netifaces.c(734) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
netifaces.c(734) : warning C4024: 'PyDict_SetItemString' : different types for formal and actual parameter 1
netifaces.c(740) : error C2065: 'dict' : undeclared identifier
netifaces.c(740) : warning C4047: 'function' : 'PyObject *' differs in levels of indirection from 'int'
netifaces.c(740) : warning C4024: 'add_to_family' : different types for formal and actual parameter 3
error: Setup script exited with error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2

Netifaces是根据c99标准编写的。在巴黎,代码使用混合声明和代码。不幸的是,Microsofts编译器不遵守该标准,并且不理解这种混合(在编译*.c文件时)。我的解决方案是简单地将源文件重命名为“netifaces.cpp”。这样,MS编译器就可以在C++中生成声明和代码混合的地方。重命名该文件还需要编辑“setup.py”以更改文件名。

您阅读了哪些问题,从中了解到了什么?我知道我需要visual studio,因为python使用相同的编译器或类似的东西。。。可能正在更改VS80VAR命令。。。相信我,我问这个问题是因为我真的找不到任何答案。谢谢。你必须安装微软Visual C++快件,然后安装<代码> EasyIsAuth。你需要和VisualC++一样的版本来构建你的Python版本。我确实安装了VisualStudio 2008 C++,但是它又给我丢了一个错误(我会粘贴到我的问题中)。