在Manjaro Linux中从Pip安装Kivy时出错

问题描述

我是初学者

manjaro Linux中安装python kivy时出错。

我使用pip install kivy命令。 ||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||

    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nzmdo5o9/kivy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-nzmdo5o9/kivy/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 /tmp/pip-pip-egg-info-1qssr8o1            
         cwd: /tmp/pip-install-nzmdo5o9/kivy/                                      
    Complete output (78 lines):                                                    
    fatal: not a git repository (or any parent up to mount point /)                
    Stopping at filesystem boundary (GIT_disCOVERY_ACROSS_FILESYstem not set).     
    WARNING: Skipping page https://github.com/kivy-garden/garden/archive/master.zip because the HEAD request got Content-Type: application/zip.The only supported Content-Type is text/html                                                              
      ERROR: Command errored out with exit status 1:                               
       command: /usr/bin/python -u -c 'import sys,tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-td6si1r9/cython/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-td6si1r9/cython/setup.py'"'"';f=getattr(tokenize,'"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-ipue10p2                   
           cwd: /tmp/pip-wheel-td6si1r9/cython/                                    
      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 "/usr/lib/python3.8/site-packages/setuptools/installer.py",line 126,in fetch_build_egg                                                                  
         subprocess.check_call(cmd)                                                
       File "/usr/lib/python3.8/subprocess.py",line 364,in check_call            
         raise CalledProcessError(retcode,cmd)                                    
     subprocess.CalledProcessError: Command '['/usr/bin/python','-m','pip','--disable-pip-version-check','wheel','--no-deps','-w','/tmp/tmpi9byfgla','--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.             
                                                                                   
     The above exception was the direct cause of the following exception:          
                                                                                   
     Traceback (most recent call last):                                            
       File "<string>",line 1,in <module>                                        
       File "/tmp/pip-install-nzmdo5o9/kivy/setup.py",line 1073,in <module>      
         setup(                                                                    
       File "/usr/lib/python3.8/site-packages/setuptools/__init__.py",line 152,in setup                                                                             
         _install_setup_requires(attrs)                                            
       File "/usr/lib/python3.8/site-packages/setuptools/__init__.py",line 147,in _install_setup_requires                                                           
         dist.fetch_build_eggs(dist.setup_requires)                                
       File "/usr/lib/python3.8/site-packages/setuptools/dist.py",line 673,in fetch_build_eggs                                                                      
         resolved_dists = pkg_resources.working_set.resolve(                       
       File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py",line 764,in resolve                                                                        
         dist = best[req.key] = env.best_match(                                    
       File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py",line 1049,in best_match                                                                    
         return self.obtain(req,installer)                                        
       File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py",line 1061,in obtain                                                                        
         return installer(requirement)                                             
       File "/usr/lib/python3.8/site-packages/setuptools/dist.py",line 732,in fetch_build_egg                                                                       
         return fetch_build_egg(self,req)                                         
       File "/usr/lib/python3.8/site-packages/setuptools/installer.py",line 128,in fetch_build_egg                                                                  
         raise distutilsError(str(e)) from e                                       
     distutils.errors.distutilsError: Command '['/usr/bin/python',>=0.24']' returned non-zero exit status 1.           
    Using setuptools                                                               
    Using this graphics system: OpenGL                                             
    GStreamer found via pkg-config                                                 
    WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)                                                 
                                                                                   
    b"Package 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\nPackage 'SDL2_ttf',required by 'virtual:world',not found\nPackage 'SDL2_image',not found\nPackage 'SDL2_mixer',not found\n"                                                     
                                                                                   
    Pango: pangoft2 found via pkg-config                                           
    {'libraries': ['pangoft2-1.0','pango-1.0','gobject-2.0','glib-2.0','harfbuzz','fontconfig','freetype'],'include_dirs': ['/tmp/pip-install-nzmdo5o9/kivy/kivy/include','/usr/include/pango-1.0','/usr/include/glib-2.0','/usr/lib/glib-2.0/include','/usr/include/harfbuzz','/usr/include/freetype2','/usr/include/libpng16','/usr/include/libmount','/usr/include/blkid','/usr/include/fribidi','/usr/include/cairo','/usr/include/pixman-1'],'library_dirs': [],'extra_link_args': [],'extra_compile_args': [],'depends': ['lib/pango/pangoft2.pxi','lib/pango/pangoft2.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

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我该如何解决错误

感谢帮助

解决方法

我有解决办法。 使用sudo pip install kivy命令