Hello everyone, I normally use kivy on Linux but there are situations where we need it to work on Windows 10 or other versions.
I installed Kivy as follows:
python -m pip install "kivy[base]" kivy_examples --no-binary kivy
I use Python 3.10.7 and when I try to install Kivy I get the following return:
PS C:\Users\EliasPai\Documents\RIKA\kv_inventario\desk> & C:/Users/EliasPai/AppData/Local/Programs/Python/Python310/python.exe c:/Users/EliasPai/Documents/RIKA/kv_inventario/desk/main.py
Traceback (most recent call last):
File "c:\Users\EliasPai\Documents\RIKA\kv_inventario\desk\main.py", line 21, in <module>
from kivy.lang import Builder
ModuleNotFoundError: No module named 'kivy.lang'
PS C:\Users\EliasPai\Documents\RIKA\kv_inventario\desk> python -m pip install "kivy[full]" kivy_examples --no-binary kivy
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip
23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453
Collecting kivy[full]
Using cached Kivy-2.1.0.tar.gz (23.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: kivy_examples in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (2.1.0)
Requirement already satisfied: kivy-deps.glew~=0.3.1 in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from kivy[full]) (0.3.1)
Requirement already satisfied: pypiwin32 in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from kivy[full]) (223)
Requirement already satisfied: kivy-deps.angle~=0.3.2 in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from kivy[full]) (0.3.3)Requirement already satisfied: pygments in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from kivy[full]) (2.13.0)
Requirement already satisfied: kivy-deps.sdl2~=0.4.5 in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from kivy[full]) (0.4.5)
Requirement already satisfied: docutils in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from kivy[full]) (0.19)
Requirement already satisfied: Kivy-Garden>=0.1.4 in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from kivy[full]) (0.1.5)
Requirement already satisfied: pillow in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from kivy[full]) (9.3.0)
Requirement already satisfied: kivy-deps.gstreamer~=0.3.3 in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from kivy[full]) (0.3.3)
Requirement already satisfied: requests in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from Kivy-Garden>=0.1.4->kivy[full]) (2.28.1)
Requirement already satisfied: pywin32>=223 in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from pypiwin32->kivy[full]) (305)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from requests->Kivy-Garden>=0.1.4->kivy[full]) (1.26.13)
Requirement already satisfied: idna<4,>=2.5 in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from requests->Kivy-Garden>=0.1.4->kivy[full]) (3.4)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from requests->Kivy-Garden>=0.1.4->kivy[full]) (2.1.1)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\eliaspai\appdata\local\programs\python\python310\lib\site-packages (from requests->Kivy-Garden>=0.1.4->kivy[full]) (2022.12.7)
Building wheels for collected packages: kivy
Building wheel for kivy (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for kivy (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [100 lines of output]
[INFO ] [Logger ] Record log in C:\Users\EliasPai\.kivy\logs\kivy_22-12-19_34.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer_dev" 0.3.3
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.3.3
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.1
[INFO ] [deps ] Successfully imported "kivy_deps.glew_dev" 0.3.1
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.4.5
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2_dev" 0.4.5
[INFO ] [Kivy ] v2.1.0
[INFO ] [Kivy ] Installed at "C:\Users\EliasPai\AppData\Local\Temp\pip-install-_he60fho\kivy_bc4fd25af74f4e2e9837ddee5de60871\kivy\__init__.py" [INFO ] [Python ] v3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\EliasPai\AppData\Local\Programs\Python\Python310\python.exe"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
<string>:370: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
<string>:373: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
<string>:377: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
Current directory is: C:\Users\EliasPai\AppData\Local\Temp\pip-install-_he60fho\kivy_bc4fd25af74f4e2e9837ddee5de60871
Source and initial build directory is:
Python path is:
C:\Users\EliasPai\AppData\Local\Temp\pip-install-_he60fho\kivy_bc4fd25af74f4e2e9837ddee5de60871
C:\Users\EliasPai\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pep517\in_process
C:\Users\EliasPai\AppData\Local\Temp\pip-build-env-rb1wkmzp\site
C:\Users\EliasPai\AppData\Local\Programs\Python\Python310\python310.zip
C:\Users\EliasPai\AppData\Local\Programs\Python\Python310\DLLs
C:\Users\EliasPai\AppData\Local\Programs\Python\Python310\lib
C:\Users\EliasPai\AppData\Local\Temp\pip-build-env-rb1wkmzp\overlay\Lib\site-packages
C:\Users\EliasPai\AppData\Local\Temp\pip-build-env-rb1wkmzp\normal\Lib\site-packages
C:\Users\EliasPai\AppData\Local\Temp\pip-install-_he60fho\kivy_bc4fd25af74f4e2e9837ddee5de60871\kivy\modules
C:\Users\EliasPai\.kivy\mods
Found Cython at C:\Users\EliasPai\AppData\Local\Temp\pip-build-env-rb1wkmzp\overlay\Lib\site-packages\Cython\__init__.py
Detected supported Cython version 0.29.28
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"Package gstreamer-1.0 was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `gstreamer-1.0.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'gstreamer-1.0' found\r\n"
GStreamer found via gst.h
WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)
b"Package sdl2 was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `sdl2.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'sdl2' found\r\nPackage SDL2_ttf was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `SDL2_ttf.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'SDL2_ttf' found\r\nPackage SDL2_image was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `SDL2_image.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'SDL2_image' found\r\nPackage SDL2_mixer was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `SDL2_mixer.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'SDL2_mixer' found\r\n"
SDL2: found SDL header at C:\Users\EliasPai\AppData\Local\Temp\pip-build-env-rb1wkmzp\overlay\Include\SDL2\SDL.h
SDL2: found SDL_mixer header at C:\Users\EliasPai\AppData\Local\Temp\pip-build-env-rb1wkmzp\overlay\Include\SDL2\SDL_mixer.h
SDL2: found SDL_ttf header at C:\Users\EliasPai\AppData\Local\Temp\pip-build-env-rb1wkmzp\overlay\Include\SDL2\SDL_ttf.h
SDL2: found SDL_image header at C:\Users\EliasPai\AppData\Local\Temp\pip-build-env-rb1wkmzp\overlay\Include\SDL2\SDL_image.h
ERROR: Dependency for context.pyx not resolved: config.pxi
ERROR: Dependency for compiler.pyx not resolved: config.pxi
ERROR: Dependency for context_instructions.pyx not resolved: config.pxi
ERROR: Dependency for fbo.pyx not resolved: config.pxi
ERROR: Dependency for gl_instructions.pyx not resolved: config.pxi
ERROR: Dependency for instructions.pyx not resolved: config.pxi
ERROR: Dependency for opengl.pyx not resolved: config.pxi
ERROR: Dependency for opengl_utils.pyx not resolved: config.pxi
ERROR: Dependency for shader.pyx not resolved: config.pxi
ERROR: Dependency for stencil_instructions.pyx not resolved: config.pxi
ERROR: Dependency for scissor_instructions.pyx not resolved: config.pxi
ERROR: Dependency for texture.pyx not resolved: config.pxi
ERROR: Dependency for vbo.pyx not resolved: config.pxi
ERROR: Dependency for vertex.pyx not resolved: config.pxi
ERROR: Dependency for vertex_instructions.pyx not resolved: config.pxi
ERROR: Dependency for cgl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_mock.pyx not resolved: config.pxi
ERROR: Dependency for cgl_gl.pyx not resolved: config.pxi
ERROR: Dependency for cgl_glew.pyx not resolved: config.pxi
ERROR: Dependency for cgl_sdl2.pyx not resolved: config.pxi
ERROR: Dependency for svg.pyx not resolved: config.pxi
warning: kivy\graphics\common.pxi:9:4: 'const_char_ptr' redeclared
warning: kivy\graphics\common.pxi:23:4: 'size_t' redeclared
warning: kivy\core\window\_window_sdl2.pyx:430:14: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
Building extensions in parallel using 4 cores
Updated build directory to: build\lib.win-amd64-cpython-310
Build configuration is:
* use_rpi = 0
* use_egl = 0
* use_opengl_es2 = 0
* use_opengl_mock = 0
* use_sdl2 = 1
* use_pangoft2 = 0
* use_ios = 0
* use_android = 0
* use_mesagl = 0
* use_x11 = 0
* use_gstreamer = 1
* use_avfoundation = 0
* use_osx_frameworks = 0
* debug_gl = 0
* kivy_sdl_gl_alpha_size = 8
* debug = False
Updated build\lib.win-amd64-cpython-310\kivy\include\config.h
Updated kivy\include\config.h
Updated build\lib.win-amd64-cpython-310\kivy\include\config.pxi
Updated kivy\include\config.pxi
Updated build\lib.win-amd64-cpython-310\kivy\setupconfig.py
Updated kivy\setupconfig.py
Detected compiler is msvc
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for kivy
Failed to build kivy
ERROR: Could not build wheels for kivy, which is required to install pyproject.toml-based projects
Any tip?
Just use the precompiled wheels…
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/844db7f4-06a1-4b3d-a19e-580edf1b1131n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/63a0e2d1.170a0220.83df9.484aSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/63a0e2d1.170a0220.83df9.484aSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
Looks like you have resolved your kivy installation problem.
This looks like an issue with kivymd:
File "C:\Users\EliasPai\AppData\Local\Programs\Python\Python310\lib\site-packages\kivymd\__init__.py", line 33, in <module>
kivy.require("2.2.0")
File "C:\Users\EliasPai\AppData\Local\Programs\Python\Python310\lib\site-packages\kivy\__init__.py", line 130, in require
raise Exception('The version of Kivy installed on this system '
Exception: The version of Kivy installed on this system is too old. (You have 2.1.0, but the application requires 2.2.0)
PS C:\Users\EliasPai\Documents\RIKA\kv_inventario\desk>
It is odd that kivyMD requires kivy 2.2.0 – it has not yet been released, I don’t even see a tag for it in GitHub. This looks like a bug that was introduced 5 days ago…
I suggest you report the issue on the kivyMD GitHub, and edit the file:
File "C:\Users\EliasPai\AppData\Local\Programs\Python\Python310\lib\site-packages\kivymd\__init__.py", line 33, in <module>
kivy.require("2.2.0")
and change line 33 to:
kivy.require("2.1.0")
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CALgom8rqqK3kvhDs7%3D%2B3N1U%3DNy1664UD%3Dpczjsm3d%3DmhuTWzbA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/1664622a-1f93-4a46-9c94-4b086454eb40n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/1664622a-1f93-4a46-9c94-4b086454eb40n%40googlegroups.com.