Reputation: 715
I've tried installing Kivy 1.9.1 and 1.9.0 on both Python 3.6 and 3.5, all with the same errors. My install process is:
1) Kivy dependencies python -m pip install --upgrade pip wheel setuptools python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew python -m pip install cython==0.23
2)Visual C++ 2015 Build Tools http://landinghub.visualstudio.com/visual-cpp-build-tools
3) Kivy python -m pip install kivy
Can anyone point me to what would be causing these errors, and how to reconcile them? I've seen other SO posts about Kivy errors, but could not find any specific to these.
Detected Cython version 0.23
User distribution detected, avoid portable command.
Windows platform detected, force GLEW usage.
Using this graphics system: OpenGL
WARNING: A problem occured while running pkg-config --libs --cflags gstreamer-1.0 (code 1)
b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
WARNING: A problem occured while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)
b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
About halfway through this error (the 6th & 7th lines below):
Generating code
Finished generating code
cythoning C:\Users\davidk\AppData\Local\Temp\pip-build-1_wuafui\kivy\kivy\graphics/context.pyx to C:\Users\davidk\AppData\Local\Temp\pip-build-1_wuafui\kivy\kivy\graphics\context.c
building 'kivy.graphics.context' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python36-32\include -IC:\Python36-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcC:\Users\davidk\AppData\Local\Temp\pip-build-1_wuafui\kivy\kivy\graphics\context.c /Fobuild\temp.win32-3.6\Release\Users\davidk\AppData\Local\Temp\pip-build-1_wuafui\kivy\kivy\graphics\context.obj
context.c
c:\users\davidk\appdata\local\temp\pip-build-1_wuafui\kivy\kivy\graphics\gl_redirect.h(8): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for kivy
Running setup.py clean for kivy
Failed to build kivy
Installing collected packages: Kivy-Garden, kivy
Found existing installation: Kivy-Garden 0.1.1
Uninstalling Kivy-Garden-0.1.1:
Successfully uninstalled Kivy-Garden-0.1.1
Running setup.py install for kivy ... error
Complete output from command C:\Python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\davidk\\AppData\\Local\\Temp\\pip-build-1_wuafui\\kivy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');
f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\davidk\AppData\Local\Temp\pip-q_vg82_f-record\install-record.txt --single-version-externally-managed --compile:
Using distutils
And then this (at the end of the install) (the last two lines):
Generating code
Finished generating code
skipping 'C:\Users\davidk\AppData\Local\Temp\pip-build-1_wuafui\kivy\kivy\graphics\context.c' Cython extension (up-to-date)
building 'kivy.graphics.context' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python36-32\include -IC:\Python36-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /TcC:\Users\davidk\AppData\Local\Temp\pip-build-1_wuafui\kivy\kivy\graphics\context.c /Fobuild\temp.win32-3.6\Release\Users\davidk\AppData\Local\Temp\pip-build-1_wuafui\kivy\kivy\graphics\context.obj
context.c
c:\users\davidk\appdata\local\temp\pip-build-1_wuafui\kivy\kivy\graphics\gl_redirect.h(8): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\davidk\\AppData\\Local\\Temp\\pip-build-1_wuafui\\kivy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\davidk\AppData\Local\Temp\pip-q_vg82_f-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\davidk\AppData\Local\Temp\pip-build-1_wuafui\kivy\
running build_ext
Build configuration is:
* use_rpi = 0
* use_mali = 0
* use_egl = 0
* use_opengl_es2 = 0
* use_opengl_debug = 0
* use_glew = 1
* use_sdl2 = 0
* use_ios = 0
* use_mesagl = 0
* use_x11 = 0
* use_gstreamer = 0
* use_avfoundation = 0
* use_osx_frameworks = 0
* debug_gl = 0
* debug = False
Upvotes: 1
Views: 2664
Reputation: 5854
Python 3.6 and 3.5 is not yet available for kivy. You should try Python 3.4 for installing kivy on your system.
Upvotes: 2
Reputation: 12409
The build config is telling us use_glew = 1
, and the errors are 'GL/glew.h': No such file or directory
.
You need to install GLEW, and I think you should be able to to use these instructions: http://sites.fas.harvard.edu/~lib175/pages/visstudio.html
Upvotes: 0