Need help installing python-cdb on windows
Hello wise people of stack overflow, I require your assistance. I'm trying to install a python module called python-cdb on a computer running Windows XP. I've installed MinGW and have been attempting to use it as my compiler, but I get the following error messages:
> python setup.py build --compiler=mingw32
running build
running build_ext
building 'cdbmodule' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Isrc/ -IC:\Python26\include-IC:\Python26\PC -c src/cdbmodule.c -o build\temp.win32-2.6\Release\src\cdbmodule.o
src/cdbmodule.c: In function 'cdbo_constructor':
src/cdbmodule.c:616:15: error: 'O_NDELAY' undeclared (first use of this function)
src/cdbmodule.c:616:15: note: each undeclared identifier is reported only once
for each function it appears in
src/cdbmodule.c: In function 'CdbMake_finish':
src/cdbmodule.c:750:3: warning: implicit declaration of function 'fsync开发者_开发问答'
error: command 'gcc' failed with exit status 1
I've done quite a bit of googling but I can't seem to find out what this 'O_NDELAY' thing is or how I can fix it.
I've also tried compiling using the MS Visual C++ 2008 compiler. In that case I get the following error message:
> pyhon setup.py build
running build
running build_ext
building 'cdbmodule' extension
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc/ -IC:\Python26\include -IC:\Python26\PC /Tcsrc/cdbmodule.c /Fobuild\temp.win32-2.6\Release\src/cdbmodule.obj
cdbmodule.c
src/cdbmodule.c(22) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2
Any help would be very much appreciated, as I'm out of ideas at this point.
I believe that your compiler cannot find the necessary files to execute your program. Maybe deleting and reinstalling Python or Visual Studio. Also make sure to update, update, update!!!
精彩评论