需要帮助在Windows上安装python-cdb

时间:2011-05-10 18:16:15

标签: python install mingw

你好聪明的人堆栈溢出,我需要你的帮助。我正在尝试在运行Windows XP的计算机上安装一个名为python-cdb的python模块。我已经安装了MinGW并且一直在尝试将它用作我的编译器,但是我收到以下错误消息:

> 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

我已经完成了相当多的谷歌搜索,但我似乎无法找出这个“O_NDELAY”是什么或我如何解决它。

我也尝试使用MS Visual C ++ 2008编译器进行编译。在这种情况下,我收到以下错误消息:

> 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

任何帮助都会非常感激,因为我现在没有想法。

1 个答案:

答案 0 :(得分:0)

我相信您的编译器找不到执行程序所需的文件。也许删除并重新安装Python或Visual Studio。还要确保更新,更新,更新!!!

相关问题