在Windows中安装M2Crypto时出错:缺少poll.h文件

时间:2016-02-15 06:31:59

标签: python

我正在尝试构建M2Crpto-0.23版本。它会抛出错误:

**SWIG/_m2crypto_wrap.c:6377:18: error: poll.h: No such file or directory**
SWIG/_m2crypto_wrap.c: In function 'ssl_sleep_with_timeout':
SWIG/_m2crypto_wrap.c:6613: error: storage size of 'fd' isn't known
SWIG/_m2crypto_wrap.c:6640: error: 'POLLIN' undeclared (first use in this      function)
SWIG/_m2crypto_wrap.c:6640: error: (Each undeclared identifier is reported only once
SWIG/_m2crypto_wrap.c:6640: error: for each function it appears in.)
SWIG/_m2crypto_wrap.c:6645: error: 'POLLOUT' undeclared (first use in this function)
SWIG/_m2crypto_wrap.c:6659: warning: implicit declaration of function 'poll'
SWIG/_m2crypto_wrap.c:6613: warning: unused variable 'fd'
SWIG/_m2crypto_wrap.c: In function 'x509v3_lhash':
SWIG/_m2crypto_wrap.c:7209: warning: return from incompatible pointer type
error: Setup script exited with error: command 'c:\\mingw\\bin\\gcc.exe'    failed with exit status 1

有人可以帮我吗?

1 个答案:

答案 0 :(得分:0)

直接安装这个对我有用: https://pypi.python.org/pypi/M2CryptoWin64