【问题标题】:How should I downgrade to Python 3.7 from Python 3.8? [duplicate]我应该如何从 Python 3.8 降级到 Python 3.7? [复制]
【发布时间】:2020-08-18 21:50:23
【问题描述】:

我正在尝试安装不支持 Python 3.8 的 kivy。 我在 Windows 10 上的 kivy 上制作了一个应用程序。我正在尝试构建一个 apk。按照说明操作后,我认为我安装了 Python 3.8,但在尝试在 VM LUbuntu 上安装 kivy 时总是出错。

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. 

我应该如何降级到 Python 3.7?

【问题讨论】:

标签: python kivy


【解决方案1】:

Python 3.8:试试这个

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

【讨论】:

    【解决方案2】:

    如何卸载 Python 3.8,然后下载 Python 3.7 的设置并安装它。

    【讨论】:

    • 他没有告诉他使用的是哪个操作系统,但是在linux上卸载python从来都不是一个好主意,许多操作系统元素都使用该语言。
    猜你喜欢
    • 1970-01-01
    • 2020-10-28
    • 2019-11-14
    • 2019-03-06
    • 1970-01-01
    • 2019-06-19
    • 2016-03-06
    • 2019-05-27
    • 2019-07-27
    相关资源
    最近更新 更多