无法安装Kivy(Windows 10,Python 3.8) [英] Cannot install Kivy (windows 10, python 3.8)

查看:378
本文介绍了无法安装Kivy(Windows 10,Python 3.8)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在系统上安装kivy时遇到很多麻烦.我以前曾做过这项工作,但由于某种原因,现在正处于非常困难的时期. 我遵循逐字指示,设置virtualenv,激活环境,安装依赖项(docutils,pygments,pypiwin32,kivy_deps.sdl2 == 0.1 *.,kivy_deps.glew == 0.1 *.,kivy_deps.gstreamer == 0.1. *).

I am having a great deal of trouble installing kivy on my system. I have had this working before but for some reason am having an extremely hard time right now. I follow the directions verbatim, setting up a virtualenv, activating the env, installing the dependencies (docutils, pygments, pypiwin32, kivy_deps.sdl2==0.1*., kivy_deps.glew==0.1*., kivy_deps.gstreamer==0.1.*).

以上所有部分都可以正常工作.当我终于去安装kivy时(py -m pip install kivy),我遇到了很多错误:

all of that part above works fine. when i finally go to install kivy (py -m pip install kivy), i get a barrage of errors:

ERROR: Command errored out with exit status 1:
     command: 'C:\Users\ferna\Documents\Python\pyenv3864\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ferna\\AppData\\Local\\Temp\\pip-install-ctrp6hf9\\kivy\\setup.py'"'"'; __file__='"'"'C:\\Users\\ferna\\AppData\\Local\\Temp\\pip-install-ctrp6hf9\\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 'C:\Users\ferna\AppData\Local\Temp\pip-install-ctrp6hf9\kivy\pip-egg-info'
         cwd: C:\Users\ferna\AppData\Local\Temp\pip-install-ctrp6hf9\kivy\
    Complete output (79 lines):
     Traceback (most recent call last):
       File "<string>", line 1, in <module>
       File "C:\Users\ferna\AppData\Local\Temp\pip-install-ctrp6hf9\kivy\setup.py", line 1073, in <module>
         setup(
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\setuptools\__init__.py", line 144, in setup
         _install_setup_requires(attrs)
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires    
         dist.fetch_build_eggs(dist.setup_requires)
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
         resolved_dists = pkg_resources.working_set.resolve(
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
         dist = best[req.key] = env.best_match(
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
         return self.obtain(req, installer)
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
         return installer(requirement)
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
         return cmd.easy_install(req)
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\setuptools\command\easy_install.py", line 665, in easy_install   
         dist = self.package_index.fetch_distribution(
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\setuptools\package_index.py", line 655, in fetch_distribution    
         dist = find(requirement)
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\setuptools\package_index.py", line 635, in find
         loc = self.download(dist.location, tmpdir)
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\setuptools\package_index.py", line 579, in download
         found = self._download_url(scheme.group(1), spec, tmpdir)   
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\setuptools\package_index.py", line 824, in _download_url
         return self._attempt_download(url, filename)
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\setuptools\package_index.py", line 830, in _attempt_download     
         headers = self._download_to(url, filename)
       File "C:\Users\ferna\Documents\Python\pyenv3864\lib\site-packages\setuptools\package_index.py", line 745, in _download_to
         block = fp.read(bs)
       File "C:\Users\ferna\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 454, in read
         n = self.readinto(b)
       File "C:\Users\ferna\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 498, in readinto
         n = self.fp.readinto(b)
       File "C:\Users\ferna\AppData\Local\Programs\Python\Python38\lib\socket.py", line 669, in readinto
         return self._sock.recv_into(b)
       File "C:\Users\ferna\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1241, in recv_into
         return self.read(nbytes, buffer)
       File "C:\Users\ferna\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1099, in read
         return self._sslobj.read(len, buffer)
     socket.timeout: The read operation timed out
    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: conf    ERROR: Dependency for vertex_instructions.pyx not resolved: config.pxi                                              xi       
    ERROR: Dependency for cgl.pyx not resolved: config.pxi  
    ERROR: Dependency for cgl_mock.pyx not resolved: config.i        pxi                                                         ed: config.pxi
    ERROR: Dependency for cgl_gl.pyx not resolved: config.pxi
    ERROR: Dependency for cgl_glew.pyx not resolved: config.pxi      pxi                                                         i        
    ERROR: Dependency for cgl_sdl2.pyx not resolved: config.pxi      pxi                                                         pxi      
    ERROR: Dependency for svg.pyx not resolved: config.pxi  
    ----------------------------------------                         fo Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_inpy egg_info Check the logs for full command output.

我还尝试使用每晚备份,安装车轮,尝试tar.gz;但是我在这里很困惑.

I have also tried using the nightly backups, installing the wheel, trying tar.gz; but I'm pretty confused here.

推荐答案

我们目前不提供Windows上Python 3.8下最新的Kivy稳定版的轮子.您的选择是:

We don't currently provide wheels for the latest Kivy stable release under Python 3.8 on Windows. Your options are:

  • 设置有效的编译器工具链并自己编译Kivy
  • 使用Python 3.7
  • 使用Kivy master分支,该分支确实具有可用的Python 3.8轮子-我不记得怎么做,但最糟糕的是Kivy不和谐的人会知道

请注意,最新的Kivy稳定版 支持Python 3.8,它可以正常工作,因此这是第一个选项可用的原因.问题完全是缺少预构建的二进制文件.

Note that the latest Kivy stable release does support Python 3.8, it works fine and that's why the first option is available. The problem is entirely the lack of prebuilt binaries.

这篇关于无法安装Kivy(Windows 10,Python 3.8)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆