簡體   English   中英

需要幫助在Windows上安裝python-cdb

[英]Need help installing python-cdb on windows

您好,堆棧溢出的人,我需要您的幫助。 我正在嘗試在運行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

任何幫助將不勝感激,因為我目前還沒有想法。

我相信您的編譯器無法找到執行程序所需的文件。 也許刪除並重新安裝Python或Visual Studio。 還請確保更新,更新,更新!!!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM