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.*).
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 "", line 1, in
File "C:\Users\ferna\AppData\Local\Temp\pip-install-ctrp6hf9\kivy\setup.py", line 1073, in
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.
I have also tried using the nightly backups, installing the wheel, trying tar.gz; but I'm pretty confused here.
解决方案
We don't currently provide wheels for the latest Kivy stable release under Python 3.8 on Windows. Your options are:
set up a working compiler toolchain and compile Kivy yourself
use Python 3.7
use the Kivy master branch, which does have Python 3.8 wheels available - I don't remember how but at worst someone on the Kivy discord will know
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.