I tried installing Kivy on a new Windows 11 Installation. Even after I have satisfied the required dependencies, I keep getting an installation error. Below is the response I received.
Updated buildlib.win-amd64-cpython-311kivyincludeconfig.h
Updated C:UsersnadeeAppDataLocalTemppip-install-878mjsbvkivy_43cb622015164809b06a8b1af4948f34kivyincludeconfig.h
Updated buildlib.win-amd64-cpython-311kivyincludeconfig.pxi
Updated C:UsersnadeeAppDataLocalTemppip-install-878mjsbvkivy_43cb622015164809b06a8b1af4948f34kivyincludeconfig.pxi
Updated buildlib.win-amd64-cpython-311kivysetupconfig.py
Updated C:UsersnadeeAppDataLocalTemppip-install-878mjsbvkivy_43cb622015164809b06a8b1af4948f34kivysetupconfig.py
Detected compiler is msvc
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\link.exe' failed with exit code 1104
[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
3
Answers
Kivy cannot be installed on python 3.11. In order to install it you need to downgrade to a lower version of python.
There is no wheel for Kivy and Python 3.11 yet.
You have to build Kivy from source. You can do that using the following commands. I am doing it in a virtual environment to keep it separate from the main system.
Kivy will now be installed and the ‘pip freeze’ should show: (version number will probably be different)
If you want to use the nightly build of Kivy that is more compatiable with Python 3.11 then you can just run these command.
Run this command: