pyswisseph的安装失败(gcc编译器失败)

时间:2022-08-15 07:01:47

I want to install the swisseph packages in my Python 2.6.2.0 version via

我想通过我的Python 2.6.2.0版本安装swisseph包

run setup.py install

运行setup.py install

I run this Python on Windows XP Home Edition (Version 2002).

我在Windows XP Home Edition(版本2002)上运行此Python。

The compilation of the C-files fails because vcvarsall.bat (part of Microsoft Visual Studio) is missing.

C文件的编译失败,因为缺少vcvarsall.bat(Microsoft Visual Studio的一部分)。

As an alternative compiler I have installed MinGW (version 2012.04.26 from www.mingw.org).

作为替代编译器,我安装了MinGW(来自www.mingw.org的版本2012.04.26)。

I have included a "config.cfg" file with the lines [build] compiler=mingw32

我已经包含一个带有[build] compiler = mingw32行的“config.cfg”文件

in the directory "C:\Python26\Lib\distutils"

在目录“C:\ Python26 \ Lib \ distutils”中

I have also included "C:\MinGW" and "C:\MinGW\bin" in the environment variable "PATH" via My Computer -> Environment Variables.

我还通过我的电脑 - >环境变量在环境变量“PATH”中包含了“C:\ MinGW”和“C:\ MinGW \ bin”。

Nevertheless the compilation of the c-files fails:

然而,c文件的编译失败了:

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

Maybe you have some further ideas.

也许你有一些进一步的想法。

1 个解决方案

#1


0  

What real error should I post?

我应该发布什么真正的错误?

This is the output from my IPython shell. I cannot say more about the problem. But maybe there are some general hints to circumvent these "setup.py install" problems.

这是我的IPython shell的输出。我不能多说这个问题。但也许有一些一般的提示来规避这些“setup.py安装”问题。

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>

#1


0  

What real error should I post?

我应该发布什么真正的错误?

This is the output from my IPython shell. I cannot say more about the problem. But maybe there are some general hints to circumvent these "setup.py install" problems.

这是我的IPython shell的输出。我不能多说这个问题。但也许有一些一般的提示来规避这些“setup.py安装”问题。

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>