-1

I have been trying to install Kivy (on PyCharm). This is what I am getting:

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

I have deleted all the instances of -mno-cygwin in distutils/cygwinccompiler and after that I was able to install Cython. But I am not able to install Kivy. Any help would be appreciated in getting this package installed.

Ajean
  • 5,528
  • 14
  • 46
  • 69

2 Answers2

1

I had a similar error , resolved by installing following

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

Details

The packages were required as the detailed error pointed to missing files GL/gl.h Upon searching

apt-file search "GL/gl.h"

I found a few libs and selected mesa-common-dev

As a result, the error changed to

cannot find -lGL

For which a solution given here just worked perfectly

arkoak
  • 2,437
  • 21
  • 35
-1

You can download Kivy (for Windows) from here. I've taken it from there, everthing is OK (I'm using PyCharm too). You also will need Pygame, you can take it there too.

Necronomicron
  • 1,150
  • 4
  • 24
  • 47