1

I am trying to install kivy which does not support Python 3.8. I have an app made on kivy on Windows 10. I am trying to build an apk. After following the instructions I figured I have Python 3.8 installed and always got an error when trying to install kivy on the VM LUbuntu.

I get this error when I try to install kivy using the sudo pip3 install kivy command.

raise DistutilsError(str(e))                                               
     distutils.errors.DistutilsError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpq9k_yp5j', '--quiet', '--find-links', 'https://github.com/kivy-garden/garden/archive/master.zip', 'cython!=0.27,!=0.27.2,<=0.29.10,>=0.24']' returned non-zero exit status 1.              
    Using setuptools                                                                
    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.\nPerhaps you should add the directory containing `gstreamer-1.0.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'gstreamer-1.0' found\n"                              

    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.\nPerhaps you should add the directory containing `sdl2.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'sdl2' found\nPackage SDL2_ttf was not found in the pkg-config search path.\nPerhaps you should add the directory containing `SDL2_ttf.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'SDL2_ttf' found\nPackage SDL2_image was not found in the pkg-config search path.\nPerhaps you should add the directory containing `SDL2_image.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'SDL2_image' found\nPackage SDL2_mixer was not found in the pkg-config search path.\nPerhaps you should add the directory containing `SDL2_mixer.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'SDL2_mixer' found\n"                                 

    WARNING: A problem occurred while running pkg-config --libs --cflags pangoft2 (code 1)                                                                              

    b"Package pangoft2 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `pangoft2.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'pangoft2' found\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. 

How should I downgrade to Python 3.7?

  • 1
    I would suggest pyenv for installing multiple python versions https://github.com/pyenv/pyenv – geckos May 04 '20 at 13:01

2 Answers2

4

Python 3.8: Try this

pip3 install kivy kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/

0

How about uninstalling Python 3.8 and then download the setup of Python 3.7 and install it.

abr
  • 107
  • 1
  • 2
  • 6
  • He didn't told which OS is using, but uninstall python on linux is never a good idea, many OS elements use the language. – Luan Torres Apr 12 '21 at 19:08