Недавно я пытался установить библиотеку kivy для использования в одном проекте, я следовал этому руководству с официального сайта библиотеки:
https://kivy.org/doc/stable/installation/installation-windows.html
Но, тем не менее, я получаю много ошибок от windows cmd terminal:
command:
'C:\Users\lucas\AppData\Local\Programs\Python\Python38\python.exe' -u
-c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lucas\\AppData\\Local\\Temp\\pip-install-7kupr225\\kivy\\setup.py'"'"';
__file__='"'"'C:\\Users\\lucas\\AppData\\Local\\Temp\\pip-install-7kupr225\\kivy\\setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
bdist_wheel -d 'C:\Users\lucas\AppData\Local\Temp\pip-wheel-qwvz28d8'
cwd: C:\Users\lucas\AppData\Local\Temp\pip-install-7kupr225\kivy\
Complete output (531 lines): 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"Package gstreamer-1.0 was not found in the pkg-config search
path.\r\nPerhaps you should add the directory containing
`gstreamer-1.0.pc'\r\nto the PKG_CONFIG_PATH environment
variable\r\nNo package 'gstreamer-1.0' found\r\n"
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.\r\nPerhaps you should add the directory containing
`gstreamer-1.0.pc'\r\nto the PKG_CONFIG_PATH environment
variable\r\nNo package 'gstreamer-1.0' found\r\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.\r\nPerhaps you should add the directory containing
`sdl2.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package
'sdl2' found\r\nPackage SDL2_ttf was not found in the pkg-config
search path.\r\nPerhaps you should add the directory containing
`SDL2_ttf.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo
package 'SDL2_ttf' found\r\nPackage SDL2_image was not found in the
pkg-config search path.\r\nPerhaps you should add the directory
containing `SDL2_image.pc'\r\nto the PKG_CONFIG_PATH environment
variable\r\nNo package 'SDL2_image' found\r\nPackage SDL2_mixer was
not found in the pkg-config search path.\r\nPerhaps you should add the
directory containing `SDL2_mixer.pc'\r\nto the PKG_CONFIG_PATH
environment variable\r\nNo package 'SDL2_mixer' found\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: 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
build_ext ---------------------------------------- ERROR: Failed
building wheel for kivy```
**other errors:**
-----------------
Другие ошибки:
ERROR: Command errored out with exit status 3221225477:
command: 'C:\Users\lucas\kivy_venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lucas\\AppData\\Local\\Temp\\pip-install-gqowcu2q\\kivy\\setup.py'"'"';
__file__='"'"'C:\\Users\\lucas\\AppData\\Local\\Temp\\pip-install-gqowcu2q\\kivy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\lucas\AppData\Local\Temp\pip-record-_9otg0p0\install-record.txt'
--single-version-externally-managed --compile --install-headers 'C:\Users\lucas\kivy_venv\include\site\python3.8\kivy'
cwd: C:\Users\lucas\AppData\Local\Temp\pip-install-gqowcu2q\kivy\
Complete output (513 lines):
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' n\xc6o \x82 reconhecido como um comando interno\r\nou externo, um programa oper\xa0vel ou um arquivo em lotes.\r\n"
WARNING: A problem occurred while running pkg-config --libs --cflags gstreamer-1.0 (code 1)
b"'pkg-config' n\xc6o \x82 reconhecido como um comando interno\r\nou externo, um programa oper\xa0vel ou um arquivo em lotes.\r\n"
WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)
b"'pkg-config' n\xc6o \x82 reconhecido como um comando interno\r\nou externo, um programa oper\xa0vel ou um arquivo em lotes.\r\n"
fatal: not a git repository (or any of the parent directories): .git
---------------------------------------- ERROR: Command errored out with exit status 3221225477: 'C:\Users\lucas\kivy_venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lucas\\AppData\\Local\\Temp\\pip-install-gqowcu2q\\kivy\\setup.py'"'"';
__file__='"'"'C:\\Users\\lucas\\AppData\\Local\\Temp\\pip-install-gqowcu2q\\kivy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\lucas\AppData\Local\Temp\pip-record-_9otg0p0\install-record.txt'
--single-version-externally-managed --compile --install-headers 'C:\Users\lucas\kivy_venv\include\site\python3.8\kivy' Check the logs for full command output.```
Я пытался установить и в терминал anaconda, установка выглядит хорошо, терминал сказал, что она прошла успешно, но когда я пытаюсь запустить его в spyder, у меня возникают следующие ошибки трассировки:
enter code here Reloaded modules: ai [WARNING] [Lang ] The
file C:\Users\lucas\OneDrive\Documentos\Artificial IntelligentA-Z -
Learn how to bulid an AI\Code
templates\P20-Self-Driving-Car\Self_Driving_Car\car.kv is loaded
multiples times, you might have unwanted behaviors. [CRITICAL] [App<br>
Unable to get a Window, abort. An exception has occurred, use %tb to
see the full traceback
Я использую следующие команды:
>python -m pip uninstall -y kivy.deps.glew kivy.deps.gstreamer
kivy.deps.sdl2 kivy.deps.angle
>python -m pip install --upgrade pip wheel setuptools virtualenv
>python -m virtualenv kivy_venv
>ivy_venv\Scripts\activate
>source kivy_venv/Scripts/activate
>python -m pip install docutils pygments pypiwin32 >kivy_deps.sdl2==0.1.*
>kivy_deps.glew==0.1.*
>python -m pip install kivy_deps.gstreamer==0.1.*
>python -m pip install kivy==1.11.1
Примечание Моя python версия - 3.8 Версия Anaconda - 3.7