2012-09-14 70 views
1

我想通過安裝pyswisseph的失敗(gcc編譯失敗)

run setup.py install

我運行此的Python在Windows XP家庭版安裝在我的 的Python 2.6.2.0版本swisseph包(2002版) 。

C文件的編譯失敗,因爲 vcvarsall.bat(Microsoft Visual Studio的一部分)缺失。

作爲替代編譯器,我安裝了MinGW (www.mingw.org版本2012.04.26)。

我已經包括與線 [build] compiler=mingw32

目錄

一個 「的config.cfg」 文件 「C:\ Python26 \ LIB \ distutils的」

我也包括「C:\ MinGW「和」C:\ MinGW \ bin「 在環境變量」路徑「中通過 我的電腦 - >環境變量。

儘管如此,C-文件的編譯失敗:

`error: command 'gcc' failed with exit status 1` 

也許你有一些進一步設想。

回答

0

我應該發佈什麼樣的真實錯誤?

這是我的IPython shell的輸出。 我不能多說這個問題。但也許有一些一般提示來規避這些「setup.py install」問題。

In [4]: run setup.py install 
running install 
running build 
running build_ext 
building 'swisseph' extension 
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Isrc -Iswephelp -IC:\Python26\include -IC:\Python26\PC -c pyswisseph.c -o build\temp.win32-2.6\Release\pyswisseph.o -std=gnu99 
cc1.exe: Fehler: nicht erkannte Kommandozeilenoption +-mno-cygwin½ 
C:\Python26\lib\site-packages\IPython\iplib.py:2856: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 
    if status.message!=0 and not kw['exit_ignore']: 
--------------------------------------------------------------------------- 
SystemExit        Traceback (most recent call last) 

C:\pyswisseph-1.77.00-0\setup.py in <module>() 
    98   ], 
    99  keywords = 'Astrology Ephemeris Swisseph', 
--> 100  ext_modules = [swemodule] 
    101 ) 
    102 

C:\Python26\lib\distutils\core.pyc in setup(**attrs) 
    167     raise 
    168    else: 
--> 169     raise SystemExit, "error: " + str(msg) 
    170 
    171  return dist 

SystemExit: error: command 'gcc' failed with exit status 1 
WARNING: Failure executing file: <setup.py>