0

I'm trying to install Kivy on Python 3.8, but I'm not sure why it's not working.

I was following these instructions, but I was having trouble when I got to the part where I finally install Kivy:

python -m pip install kivy==1.11.1


EDIT:

Tried installing pkg-install, but it didn't work.

Tried installing pkg-config inside virtual environment, but didn't work.

Tried installing Windows 10 SDK to fix the io.h issue, but that gave new errors.


I got the following error msg after installing the Windows 10 SDK:

(top error msg was actually cut off from the amount of text)

[...] a bunch of copying

\kivy\tools\theming\defaulttheme
  copying kivy\tools\theming\defaulttheme\vkeyboard_disabled_key_normal.png -> build\lib.win-amd64-3.8\kivy\tools\theming\defaulttheme
  copying kivy\tools\theming\defaulttheme\vkeyboard_key_down.png -> build\lib.win-amd64-3.8\kivy\tools\theming\defaulttheme
  copying kivy\tools\theming\defaulttheme\vkeyboard_key_normal.png -> build\lib.win-amd64-3.8\kivy\tools\theming\defaulttheme
  running build_ext
  ----------------------------------------
  ERROR: Failed building wheel for kivy
  Running setup.py clean for kivy
  Building wheel for Kivy-Garden (setup.py) ... done
  Created wheel for Kivy-Garden: filename=Kivy_Garden-0.1.4-py3-none-any.whl size=4536 sha256=ccdae0685665ec663c778d7d305fb2f1d0c2aa16d16fd34db6b355d32e8016e1
  Stored in directory: c:\users\redxx\appdata\local\pip\cache\wheels\d2\72\1a\9ddd17f00755707937caa350616965fb3330a6270425f397e6
Successfully built Kivy-Garden
Failed to build kivy
Installing collected packages: urllib3, certifi, idna, chardet, requests, Kivy-Garden, kivy
    Running setup.py install for kivy ... error
    ERROR: Command errored out with exit status 3221225477:
     command: 'C:\Users\redxx\kivy_venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\redxx\\AppData\\Local\\Temp\\pip-install-bd6bdwng\\kivy\\setup.py'"'"'; __file__='"'"'C:\\Users\\redxx\\AppData\\Local\\Temp\\pip-install-bd6bdwng\\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\redxx\AppData\Local\Temp\pip-record-sxsypwdh\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\redxx\kivy_venv\include\site\python3.8\kivy'
         cwd: C:\Users\redxx\AppData\Local\Temp\pip-install-bd6bdwng\kivy\
    Complete output (512 lines):
    Using setuptools
    User distribution detected, avoid portable command.
    Using this graphics system: OpenGL
    WARNING: A problem occurred 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 occurred 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 occurred 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"

[...] a bunch of running/creating/copying

RROR: Command errored out with exit status 3221225477: 'C:\Users\redxx\kivy_venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\redxx\\AppData\\Local\\Temp\\pip-install-bd6bdwng\\kivy\\setup.py'"'"'; __file__='"'"'C:\\Users\\redxx\\AppData\\Local\\Temp\\pip-install-bd6bdwng\\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\redxx\AppData\Local\Temp\pip-record-sxsypwdh\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\redxx\kivy_venv\include\site\python3.8\kivy' Check the logs for full command output.

Could anyone please help me understand what the issue is and how I ought to resolve it?

MontX
  • 94
  • 7
  • Possible duplicate of https://stackoverflow.com/questions/32841199/pkg-config-is-not-recognized-as-an-internal-or-external-command-when-installin – tripleee Nov 10 '20 at 06:49
  • Possible duplicate of https://stackoverflow.com/questions/40018405/cannot-open-include-file-io-h-no-such-file-or-directory – tripleee Nov 10 '20 at 06:50
  • I tried installing pkgconfig using pip, but I'm still getting the same errors. – MontX Nov 10 '20 at 15:09
  • Your update looks like it succeeded. Did you leave out the failure message or did it actually work? – tripleee Nov 10 '20 at 15:46
  • I left out the failure msg because of the character limit, but the failure msg is the same as before. – MontX Nov 11 '20 at 01:48
  • It can't be exactly the same. Probably clip the old failure message and include the new one in full instead. The important part to keep is where it tells you what went wrong, not *that* it went wrong. – tripleee Nov 11 '20 at 04:25
  • Thanks for your help thus far tripleee! I clipped the old failure message and put the new one in the post. Also, I just noticed ur name is triple E as in triple EEE hahaha clever – MontX Nov 11 '20 at 19:11
  • Uh, you installed `pkgconfig` outside the virtualenv successfully, but then when you did `activate` you put it out of reach again? – tripleee Nov 11 '20 at 19:35
  • I tried installing pkgconfig inside the virtualenv this time, but it still didn't work. I updated the failure msg in the post. – MontX Nov 11 '20 at 20:12
  • The instructions have a large number of dependencies. Are you sure you have really installed them all? Did you try the things in the second proposed duplicate? – tripleee Nov 12 '20 at 05:55
  • Sorry, I'm still new to Python. I re-read the error message so maybe I'm just not sure which dependencies Python is asking me to install. Would one be pgen? or the one with the file "io.h" missing? – MontX Nov 12 '20 at 06:13
  • Yeah, the lack of `io.h` looks like you lack some compiler resources. – tripleee Nov 12 '20 at 06:15
  • I just found this resource (https://blog.piwheels.org/how-to-work-out-the-missing-dependencies-for-a-python-package/). I'll try what they suggest and follow up! – MontX Nov 12 '20 at 06:16
  • The download error from Github for kivy-gardens also looks suspicious. – tripleee Nov 12 '20 at 06:26
  • I tried installing the Windows 10 SDK to fix the io.h issue, but I'm still getting errors. It looks like I still have a pkg-confg issue for some reason even though we just installed that... I updated the post. Any thoughts? – MontX Nov 12 '20 at 06:39
  • Probably try to reduce to a [mre], I'm guessing it's one specific dependency rather than all of Kivy really. – tripleee Nov 12 '20 at 06:45

0 Answers0