0

Windows 10, Python 3.6, Kivy 1.9.1

Some of the answers on this site have been really helpful. It looks like what I need to do is to install glew, but oddly it seems harder than it looks. Here's my output on the command line when trying to install kivy with the command

python -m pip install kivy

I'm going through the installation instructions in https://kivy.org/docs/installation/installation-windows.html#installation-windows

Here is the end of the output from the command line:

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.10.25017\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.10.25017\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.10.25017\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt" /TcC:\Users\Andrew\AppData\Local\Temp\pip-build-8icy8c14\kivy\kivy\graphics\context.c /Fobuild\temp.win-amd64-3.6\Release\Users\Andrew\AppData\Local\Temp\pip-build-8icy8c14\kivy\kivy\graphics\context.obj context.c c:\users\andrew\appdata\local\temp\pip-build-8icy8c14\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\2017\BuildTools\VC\Tools\MSVC\14.10.25017\bin\HostX86\x64\cl.exe' failed with exit status 2


Command "C:\ProgramData\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Andrew\AppData\Local\Temp\pip-build-8icy8c14\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\Andrew\AppData\Local\Temp\pip-mpef3eip-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Andrew\AppData\Local\Temp\pip-build-8icy8c14\kivy\

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools>

I've tried installing glew from here http://glew.sourceforge.net/index.html . I have unpacked it a few times and tried to paste the relevant files in the right place a few times, but it hasn't helped. I've also tried some suggestions I found here and on other sites, but they haven't helped either.

I also tried to do this, but I'm going to need it in plain English. I don't understand a lot of it.

Help is much appreciated! I've been trying to get kivy installed for like a full day and a half, and I'm looking forward to getting it running.

Community
  • 1
  • 1
Andrew Horn
  • 2,291
  • 2
  • 16
  • 26

2 Answers2

3

Python 3.6, Kivy 1.9.1

I'm going through the installation instructions in https://kivy.org/docs/installation/installation-windows.html#installation-windows

and apparently you don't see this pretty warning almost on the top of the page:

Support for Python 3.5 and higher isn’t available with the current stable version (1.9.1). Compile the master branch or use the nightly wheels.

Which means that even if you had the headers that are also mentioned on the same page, but in the section for compiling which is where you get if you'd read the warning it still wouldn't compile that way because the code in version 1.9.1 doesn't support Python 3.5 or higher.

So, you want to install Kivy on Python 3.6. Let's go once again through the docs :P

The warning tells you that you need master branch (meaning a GitHub repository branch) and sends you to two parts of the docs:

Using the development version requires a compiler which for 3.6 is either the whole Visual Studio or it's smaller "Build Tools" subpart. That's pretty much 4GB(or 8?) just for the option to compile. Nah, generally you don't want to go through that, but apparently you already have the beast downloaded, so... let's hope you didn't paste the glew folder right into the compiler and it'll still work. These are the headers you need:

pip install kivy.deps.glew_dev kivy.deps.sdl2_dev

If you by any change unpacked the glew files into the compiler folders directly, well, you might not be able to compile Kivy after such a step. If that's correct, then you successfully broke the compiler especially if you've overwrote some files in it.

So, the second option then! The wheels are already compiled packages of Kivy, therefore no compiler is necessary (nor the _dev headers) and the installation is like ~1 minute max with a slow connection. Let's choose the correct wheel for you - from temp.win-amd64-3.6 in the log I guess you have Python 3.6 64bit version therefore:

pip install https://kivy.org/downloads/appveyor/kivy/Kivy-1.9.2.dev0-cp36-cp36m-win_amd64.whl

If Kivy doesn't install after that, try to use pip install -I to overwrite whatever you installed.

Community
  • 1
  • 1
Peter Badida
  • 11,310
  • 10
  • 44
  • 90
0

On one windows 10 machine pip install of glew it worked fine. The other I had to download from glew and manually add them to the folders.

James
  • 31
  • 2