无法安装Kivy:错误:命令'gcc'失败,退出状态为1

时间:2014-07-13 13:40:39

标签: python-2.7 gcc pycharm kivy

我一直在尝试安装Kivy(在PyCharm上)。 这就是我得到的:

Install packages failed: Error occurred when installing package Kivy. 

The following command was executed:

packaging_tool.py install --build-dir C:\Users\RASHES~1\AppData\Local\Temp\pycharm-packaging3306910965492761281.tmp --user Kivy

The error output of the command:


Downloading/unpacking Kivy
  Running setup.py (path:C:\Users\RASHES~1\AppData\Local\Temp\pycharm-packaging3306910965492761281.tmp\Kivy\setup.py) egg_info for package Kivy
    [INFO              ] Kivy v1.8.0
    'pkg-config' is not recognized as an internal or external command,
    operable program or batch file.
    Windows platform detected, force GLEW usage.

Requirement already satisfied (use --upgrade to upgrade): Kivy-Garden==0.1.1 in c:\python27\lib\site-packages\kivy-1.8.0-py2.7-win32\python27\lib\site-packages\kivy_garden-0.1.1-py2.7.egg (from Kivy)
Requirement already satisfied (use --upgrade to upgrade): requests in c:\python27\lib\site-packages\kivy-1.8.0-py2.7-win32\python27\lib\site-packages\requests-2.2.1-py2.7.egg (from Kivy-Garden==0.1.1->Kivy)
Installing collected packages: Kivy
  Running setup.py install for Kivy
    [INFO              ] Kivy v1.8.0
    'pkg-config' is not recognized as an internal or external command,
    operable program or batch file.
    Windows platform detected, force GLEW usage.
    Build configuration is:
     * use_rpi = False
     * use_opengl_es2 = True
     * use_opengl_debug = False
     * use_glew = True
     * use_sdl = False
     * use_ios = False
     * use_mesagl = False
     * use_x11 = False
     * use_gstreamer = False
     * use_avfoundation = False
    Generate config.h
    Generate config.pxi
    Detected compiler is mingw32
    cythoning C:\Users\RASHES~1\AppData\Local\Temp\pycharm-packaging3306910965492761281.tmp\Kivy\kivy\graphics/texture.pyx to 
\pycharm-packaging3306910965492761281.tmp\Kivy\kivy\graphics\texture.c
    building 'kivy.graphics.texture' extension
    c:\mingw\bin\gcc.exe -mdll -O -Wall -IC:\Python27\Lib\site-packages\Kivy-1.8.0-py2.7-win32\Python27\include -IC:\Python27\Lib\site-packages\Kivy-1.8.0-py2.7-win32\Python27\PC -c \pycharm-packaging3306910965492761281.tmp\Kivy\kivy\graphics\texture.c -o 
\pycharm-packaging3306910965492761281.tmp\kivy\kivy\graphics\texture.o
\pycharm-packaging3306910965492761281.tmp\Kivy\kivy\graphics\texture.c:311:
\pycharm-packaging3306910965492761281.tmp\Kivy\kivy\graphics\gl_redirect.h:8:22: error: GL/glew.h: No such file or directory
    In file included from C:\Users\RASHES~1\AppData\Local\Temp\pycharm-packaging3306910965492761281.tmp\Kivy\kivy\graphics\texture.c:311:
    C:\Users\RASHES~1\AppData\Local\Temp\pycharm-packaging3306910965492761281.tmp\Kivy\kivy\graphics\gl_redirect.h: In function 'glew_dynamic_binding':
\pycharm-packaging3306910965492761281.tmp\Kivy\kivy\graphics\gl_redirect.h:71: warning: implicit declaration of function 'glGetString'











\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14254: error: '__pyx_v_4kivy_8graphics_7texture_GL_BGR' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14263: error: '__pyx_v_4kivy_8graphics_7texture_GL_BGRA' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14272: error: '__pyx_v_4kivy_8graphics_7texture_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14281: error: '__pyx_v_4kivy_8graphics_7texture_GL_COMPRESSED_RGBA_S3TC_DXT3_EXT' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14290: error: '__pyx_v_4kivy_8graphics_7texture_GL_COMPRESSED_RGBA_S3TC_DXT5_EXT' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14299: error: '__pyx_v_4kivy_8graphics_7texture_GL_ETC1_RGB8_OES' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14308: error: '__pyx_v_4kivy_8graphics_7texture_GL_PALETTE4_RGB8_OES' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14317: error: '__pyx_v_4kivy_8graphics_7texture_GL_PALETTE4_RGBA8_OES' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14326: error: '__pyx_v_4kivy_8graphics_7texture_GL_PALETTE4_R5_G6_B5_OES' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14335: error: '__pyx_v_4kivy_8graphics_7texture_GL_PALETTE4_RGBA4_OES' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14344: error: '__pyx_v_4kivy_8graphics_7texture_GL_PALETTE4_RGB5_A1_OES' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14353: error: '__pyx_v_4kivy_8graphics_7texture_GL_PALETTE8_RGB8_OES' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14362: error: '__pyx_v_4kivy_8graphics_7texture_GL_PALETTE8_RGBA8_OES' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14371: error: '__pyx_v_4kivy_8graphics_7texture_GL_PALETTE8_R5_G6_B5_OES' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14380: error: '__pyx_v_4kivy_8graphics_7texture_GL_PALETTE8_RGBA4_OES' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14389: error: '__pyx_v_4kivy_8graphics_7texture_GL_PALETTE8_RGB5_A1_OES' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14398: error: '__pyx_v_4kivy_8graphics_7texture_GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14407: error: '__pyx_v_4kivy_8graphics_7texture_GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14416: error: '__pyx_v_4kivy_8graphics_7texture_GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14425: error: '__pyx_v_4kivy_8graphics_7texture_GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14444: error: 'GL_RGBA' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14452: error: 'GL_RGB' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14468: error: 'GL_LUMINANCE' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14472: error: 'GL_LUMINANCE_ALPHA' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14714: error: 'GL_UNSIGNED_BYTE' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14718: error: 'GL_UNSIGNED_SHORT' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14730: error: 'GL_UNSIGNED_INT' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14734: error: 'GL_BYTE' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14746: error: 'GL_SHORT' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14750: error: 'GL_INT' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14754: error: 'GL_FLOAT' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\
kivy\graphics\texture.c:14780: error: 'GLubyte' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14784: error: 'GLushort' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14796: error: 'GLuint' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14800: error: 'GLbyte' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14812: error: 'GLshort' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14816: error: 'GLint' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14828: error: 'GLfloat' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14854: error: 'GL_NEAREST' undeclared (first use in this function)
\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14858: error: 'GL_LINEAR' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14870: error: 'GL_NEAREST_MIPMAP_NEAREST' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14882: error: 'GL_NEAREST_MIPMAP_LINEAR' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14894: error: 'GL_LINEAR_MIPMAP_NEAREST' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:14906: error: 'GL_LINEAR_MIPMAP_LINEAR' undeclared (first use in this function)

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c: At top level:

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:16002: error: expected ')' before 'val'

\pycharm-packaging3867046896714456721.tmp\Kivy\kivy\graphics\texture.c:16027: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__Pyx_PyInt_from_py_GLuint'

error: command 'gcc' failed with exit status 1

我已删除-mno-cygwindistutils/cygwinccompiler的所有实例 之后我就能安装Cython了。但是我无法安装Kivy。 在安装此软件包时,我们将不胜感激。

2 个答案:

答案 0 :(得分:1)

我有类似的错误,通过安装以下

解决
apt-get install  mesa-common-dev libgl1-mesa-dev

<强>详情

包裹是必需的,因为详细错误指向丢失的文件GL/gl.h搜索时

apt-file search "GL/gl.h"

我找到了一些库并选择了mesa-common-dev

结果,错误变为

cannot find -lGL

给予here的解决方案完美无缺

答案 1 :(得分:-1)

您可以从here下载Kivy(适用于Windows)。我从那里拿走了它,一切都好(我也在使用PyCharm)。你也需要Pygame,你也可以把它带到那里。

相关问题