我想在运行 python 2.6 的 Windows 中安装bitarray。
我已经安装了 mingw32,并且我已经C:\Python26\Lib\distutils\distutils.cfg
设置为:
[build]
compiler = mingw32
如果我输入,在一个cmd.exe
窗口中:
C:\Documents and Settings\john\My Documents\bitarray-0.3.5>python setup.py install
我得到:
[normal python messages skipped]
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python26\include -IC:\Python26\PC -c bitarray/_bitarray.c -o build\temp.win32-2.6\Release\bitarray\_bitarray.o
bitarray/_bitarray.c:2197: error: initializer element is not constant
bitarray/_bitarray.c:2197: error: (near initialization for `BitarrayIter_Type.tp_getattro')
bitarray/_bitarray.c:2206: error: initializer element is not constant
bitarray/_bitarray.c:2206: error: (near initialization for `BitarrayIter_Type.tp_iter')
bitarray/_bitarray.c:2232: error: initializer element is not constant
bitarray/_bitarray.c:2232: error: (near initialization for `Bitarraytype.tp_getattro')
bitarray/_bitarray.c:2253: error: initializer element is not constant
bitarray/_bitarray.c:2253: error: (near initialization for `Bitarraytype.tp_alloc')
bitarray/_bitarray.c:2255: error: initializer element is not constant
bitarray/_bitarray.c:2255: error: (near initialization for `Bitarraytype.tp_free')
error: command 'gcc' failed with exit status 1
任何人都可以帮忙吗?