0
pip install cython
python -m virtualenv kivy_env
kivy_env\Scripts\activate
pip install kivy_deps.gstreamer==0.1.*
pip install kivy_deps.angle==0.1.*
pip install kivy

Last command is giving below error.


    Microsoft Windows [Version 10.0.19041.630]
(c) 2020 Microsoft Corporation. All rights reserved.

(venv) C:\Users\UdayKiranReddy\PycharmProjects\pythonProject>pip install kivy
Collecting kivy
  Using cached Kivy-1.11.1.tar.gz (23.6 MB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\udaykiranreddy\pycharmprojects\pythonproject\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\UdayKi
ranReddy\\AppData\\Local\\Temp\\pip-install-bslm8np7\\kivy_ecf3b0a632eb42a8a10a708e4fb19474\\setup.py'"'"'; __file__='"'"'C:\\Users\\UdayKiranReddy\\AppData\\Local\\Tem
p\\pip-install-bslm8np7\\kivy_ecf3b0a632eb42a8a10a708e4fb19474\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\UdayKiranReddy\AppData\Local\Temp\pip-pip-egg-info-whukn1ir'
         cwd: C:\Users\UdayKiranReddy\AppData\Local\Temp\pip-install-bslm8np7\kivy_ecf3b0a632eb42a8a10a708e4fb19474\
    Complete output (83 lines):
    fatal: not a git repository (or any of the parent directories): .git
    WARNING: Skipping page https://github.com/kivy-garden/garden/archive/master.zip because the HEAD request got Content-Type: application/zip.The only supported Conten
t-Type is text/html
      ERROR: Command errored out with exit status 1:
       command: 'c:\users\udaykiranreddy\pycharmprojects\pythonproject\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\U
dayKiranReddy\\AppData\\Local\\Temp\\pip-wheel-cghv2wc5\\cython_d75d970a73ce474cb11b9629b7e22955\\setup.py'"'"'; __file__='"'"'C:\\Users\\UdayKiranReddy\\AppData\\Local
\\Temp\\pip-wheel-cghv2wc5\\cython_d75d970a73ce474cb11b9629b7e22955\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"
'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\UdayKiranReddy\AppData\Local\Temp\pip-wheel-hqy4vafk'
           cwd: C:\Users\UdayKiranReddy\AppData\Local\Temp\pip-wheel-cghv2wc5\cython_d75d970a73ce474cb11b9629b7e22955\
      Complete output (7 lines):
      Unable to find pgen, not compiling formal grammar.
      usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: setup.py --help [cmd1 cmd2 ...]
         or: setup.py --help-commands
         or: setup.py cmd --help
    
      error: invalid command 'bdist_wheel'
      ----------------------------------------
      ERROR: Failed building wheel for cython
    ERROR: Failed to build one or more wheels
     WARNING: The wheel package is not available.
     Traceback (most recent call last):
       File "c:\users\udaykiranreddy\pycharmprojects\pythonproject\venv\lib\site-packages\setuptools\installer.py", line 126, in fetch_build_egg
         subprocess.check_call(cmd)
       File "C:\Users\UdayKiranReddy\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 364, in check_call
         raise CalledProcessError(retcode, cmd)
     subprocess.CalledProcessError: Command '['c:\\users\\udaykiranreddy\\pycharmprojects\\pythonproject\\venv\\scripts\\python.exe', '-m', 'pip', '--disable-pip-versio
n-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\UDAYKI~1\\AppData\\Local\\Temp\\tmpwosh7xph', '--quiet', '--find-links', 'https://github.com/kivy-garden/garden/archiv
e/master.zip', 'cython!=0.27,!=0.27.2,<=0.29.10,>=0.24']' returned non-zero exit status 1.
    
     The above exception was the direct cause of the following exception:
    
     Traceback (most recent call last):
       File "<string>", line 1, in <module>
       File "C:\Users\UdayKiranReddy\AppData\Local\Temp\pip-install-bslm8np7\kivy_ecf3b0a632eb42a8a10a708e4fb19474\setup.py", line 1073, in <module>
         setup(
       File "c:\users\udaykiranreddy\pycharmprojects\pythonproject\venv\lib\site-packages\setuptools\__init__.py", line 152, in setup
         _install_setup_requires(attrs)
       File "c:\users\udaykiranreddy\pycharmprojects\pythonproject\venv\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
         dist.fetch_build_eggs(dist.setup_requires)
       File "c:\users\udaykiranreddy\pycharmprojects\pythonproject\venv\lib\site-packages\setuptools\dist.py", line 673, in fetch_build_eggs
         resolved_dists = pkg_resources.working_set.resolve(
       File "c:\users\udaykiranreddy\pycharmprojects\pythonproject\venv\lib\site-packages\pkg_resources\__init__.py", line 764, in resolve
         dist = best[req.key] = env.best_match(
       File "c:\users\udaykiranreddy\pycharmprojects\pythonproject\venv\lib\site-packages\pkg_resources\__init__.py", line 1049, in best_match
         return self.obtain(req, installer)
       File "c:\users\udaykiranreddy\pycharmprojects\pythonproject\venv\lib\site-packages\pkg_resources\__init__.py", line 1061, in obtain
         return installer(requirement)
       File "c:\users\udaykiranreddy\pycharmprojects\pythonproject\venv\lib\site-packages\setuptools\dist.py", line 732, in fetch_build_egg
         return fetch_build_egg(self, req)
       File "c:\users\udaykiranreddy\pycharmprojects\pythonproject\venv\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
         raise DistutilsError(str(e)) from e
     distutils.errors.DistutilsError: Command '['c:\\users\\udaykiranreddy\\pycharmprojects\\pythonproject\\venv\\scripts\\python.exe', '-m', 'pip', '--disable-pip-vers
ion-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\UDAYKI~1\\AppData\\Local\\Temp\\tmpwosh7xph', '--quiet', '--find-links', 'https://github.com/kivy-garden/garden/arch
ive/master.zip', 'cython!=0.27,!=0.27.2,<=0.29.10,>=0.24']' returned non-zero exit status 1.
    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"
    
    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
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

This is about installation, so posted in serverfault but they redirected me here and closed that question there.

I tried on multiple machines but faced the same issue there also.

Even I tried creating a virtualenvironments for python and same issue there also. Tried with lower version of python3. i.e. python 3.7 64-bit but same issue.

uday kiran
  • 57
  • 8
  • Does this answer your question? [How to deal with Kivy installing error in Python 3.8?](https://stackoverflow.com/questions/59125232/how-to-deal-with-kivy-installing-error-in-python-3-8) – Daemon Painter Dec 09 '20 at 13:32

2 Answers2

0

I installed kivey as follows:

$ pip install cython==0.28.6
$ sudo apt-get install libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
$ pip install kivy

I'm using Ubuntu 20.04 and Python 3.8.5

Gara Walid
  • 116
  • 2
  • pip will point to python 2 for ubuntu. I am getting this error on windows.WIth these steps also it is not working for me, – uday kiran Dec 10 '20 at 10:38
  • It depends on how you configured your python. You can use `python3 -m pip install cython==0.28.6` instead of `pip`. N.B: Make sure that `python3` is working, some OS has `python3.6` instead. – Gara Walid Dec 11 '20 at 10:19
  • I got error while installing cython. This is the log https://raw.githubusercontent.com/uday1kiran/logs/master/kivy_logs/cython%20install.log I tried installing buildtools but same issue – uday kiran Dec 15 '20 at 07:48
  • https://raw.githubusercontent.com/uday1kiran/logs/master/kivy_logs/cython%20install_after%20build%20tools.log – uday kiran Dec 15 '20 at 08:11
0

We need to install build tools as a prerequisite.

https://answers.microsoft.com/en-us/windows/forum/windows_other-windows_install/microsoft-visual-c-140/6f0726e2-6c32-4719-9fe5-aa68b5ad8e6d

Then, we need to install cython (the latest version.) 0.29.21 worked for me.

pip install cython

Then install kivy using.

pip install kivy
uday kiran
  • 57
  • 8