Recently I was trying to install kivy library to use in one project, I've followed this tutorial from official website of the library:
https://kivy.org/doc/stable/installation/installation-windows.html
But,nonetheless, I get a lot of errors from 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:**
-----------------
Others error:
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.```
I've tried to install in anaconda terminal too, the installing looks good , the terminal said that it was successfully, but when I try to run it in the spyder, I've got theses traceback errors:
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
Unable to get a Window, abort. An exception has occurred, use %tb to
see the full traceback
I use these commands:
>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
Note
My python version is 3.8
Anaconda version is 3.7
Related
I was trying to download a specific version of kivy on windows 10
Using the command pip install kivy==1.11.1
But unfortunately its throwing me the an error every time
I tried on python 3.8 and 3.9
Error
PS C:\Users\DELL\PycharmProjects\pythonProject5> pip install kivy==1.11.1
Collecting kivy==1.11.1
Using cached Kivy-1.11.1.tar.gz (23.6 MB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\DELL\PycharmProjects\pythonProject5\venv\Scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\
DELL\\AppData\\Local\\Temp\\pip-install-xzh5pn7u\\kivy_fa50084c889744ab947ceda05f1f5068\\setup.py'"'"'; __file__='"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-
install-xzh5pn7u\\kivy_fa50084c889744ab947ceda05f1f5068\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.
StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'
"'"'))' egg_info --egg-base 'C:\Users\DELL\AppData\Local\Temp\pip-pip-egg-info-31ligwpm'
cwd: C:\Users\DELL\AppData\Local\Temp\pip-install-xzh5pn7u\kivy_fa50084c889744ab947ceda05f1f5068\
Complete output (395 lines):
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: 'C:\Users\DELL\PycharmProjects\pythonProject5\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Us
ers\\DELL\\AppData\\Local\\Temp\\pip-wheel-shrhx05n\\cython_6ddf5340cd6c4d32af23f49c9f16fd57\\setup.py'"'"'; __file__='"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\
\pip-wheel-shrhx05n\\cython_6ddf5340cd6c4d32af23f49c9f16fd57\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) els
e io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'
exec'"'"'))' bdist_wheel -d 'C:\Users\DELL\AppData\Local\Temp\pip-wheel-z42_ozzm'
cwd: C:\Users\DELL\AppData\Local\Temp\pip-wheel-shrhx05n\cython_6ddf5340cd6c4d32af23f49c9f16fd57\
Complete output (321 lines):
Unable to find pgen, not compiling formal grammar.
running bdist_wheel
packages\setuptools\installer.py", line 77, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['C:\\Users\\DELL\\PycharmProjects\\pythonProject5\\venv\\Scripts\\python.exe', '-m', 'pip', '--disable-pip-versio
n-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\DELL\\AppData\\Local\\Temp\\tmpmf8k8ffx', '--quiet', '--find-links', 'https://github.com/kivy-garden/garden/arc
hive/master.zip', 'cython!=0.27,!=0.27.2,<=0.29.10,>=0.24']' returned non-zero exit status 1.
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: 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
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/1b/4d/3f8a720f561dc1eabe036c0d87c6ce9d02823275391265538e606f45e37a/Kivy-1.11.1.tar.gz#sha256=4d0e596f
74271e901b551f77661dde238df4765484fce9f5d1c72e8022984e84 (from https://pypi.org/simple/kivy/). Command errored out with exit status 1: python setup.py egg_info C
heck the logs for full command output.
ERROR: Could not find a version that satisfies the requirement kivy==1.11.1 (from versions: 1.0.1a0, 1.0.2a0, 1.0.3a0, 1.0.4b0, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9
, 1.1.0, 1.1.1, 1.2.0, 1.3.0, 1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.11.1,
2.0.0rc1, 2.0.0rc2, 2.0.0rc3, 2.0.0rc4, 2.0.0)
ERROR: No matching distribution found for kivy==1.11.1
WARNING: You are using pip version 21.1.2; however, version 21.3.1 is available.
You should consider upgrading via the 'C:\Users\DELL\PycharmProjects\pythonProject5\venv\Scripts\python.exe -m pip install --upgrade pip' command.
PS C:\Users\DELL\PycharmProjects\pythonProject5>
Note: ive discarded some lines form the error due to stackoverflow's character limit
Kivy 1.11. 0 is the last release that supports Python 2. Now that python is installed, open the Command line and make sure python is available by typing python --version .
It's for Python 2 and You're On Python 3
and You want to downgrade for that!
I am trying to install Kivy by using: pip3 install Kivy and I keep getting this error ERROR: command errored out with exit status 1
My pip is up to date and I tried installing the library via PyCharm and via the Terminal (I am using a mac). Thanks in advance
added the error below
Collecting Kivy
Using cached Kivy-1.11.1.tar.gz (23.6 MB)
DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
ERROR: Command errored out with exit status 1:
command: /Users/davidsokulin/PycharmProjects/FirsProject/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pycharm-packaging/kivy/setup.py'"'"'; __file__='"'"'/private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pycharm-packaging/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 /private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pip-pip-egg-info-m9a_f9np
cwd: /private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pycharm-packaging/kivy/
Complete output (92 lines):
Using setuptools
User distribution detected, avoid portable command.
Using this graphics system: OpenGL ES 2
OSX framework used, force to x86_64 only
OSX ARCHFLAGS are: -arch x86_64
GStreamer framework not found, fallback on pkg-config
WARNING: A problem occurred while running pkg-config --libs --cflags gstreamer-1.0 (code 127)
b'/bin/sh: pkg-config: command not found\n'
Missing framework /Library/Frameworks/SDL2.framework
Missing framework /Library/Frameworks/SDL2_ttf.framework
Missing framework /Library/Frameworks/SDL2_image.framework
Missing framework /Library/Frameworks/SDL2_mixer.framework
SDL2 frameworks not found, fallback on pkg-config
WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 127)
b'/bin/sh: pkg-config: command not found\n'
Xcode detected at b'/Applications/Xcode.app/Contents/Developer', and using OS X10.15 sdk
WARNING: A problem occurred while running pkg-config --libs --cflags pangoft2 (code 127)
b'/bin/sh: pkg-config: command not 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
fatal: not a git repository (or any of the parent directories): .git
WARNING: The wheel package is not available.
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: /Users/davidsokulin/PycharmProjects/FirsProject/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pip-wheel-ijxakt66/cython/setup.py'"'"'; __file__='"'"'/private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pip-wheel-ijxakt66/cython/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 /private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pip-wheel-oan20jxf
cwd: /private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pip-wheel-ijxakt66/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
Traceback (most recent call last):
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/installer.py", line 126, in fetch_build_egg
subprocess.check_call(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/davidsokulin/PycharmProjects/FirsProject/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/tmp25x0n6e6', '--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 "/private/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/pycharm-packaging/kivy/setup.py", line 1073, in <module>
setup(
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/dist.py", line 673, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 764, in resolve
dist = best[req.key] = env.best_match(
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1049, in best_match
return self.obtain(req, installer)
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1061, in obtain
return installer(requirement)
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/dist.py", line 732, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Users/davidsokulin/PycharmProjects/FirsProject/venv/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/Users/davidsokulin/PycharmProjects/FirsProject/venv/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/ch/_69bcffn79s9nxnc5mzrsm4r0000gn/T/tmp25x0n6e6', '--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.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
It seems you miss pkg-config, try with
brew install pkg-config
This question already has answers here:
How to deal with Kivy installing error in Python 3.8?
(5 answers)
Closed 2 years ago.
I am trying to install kivy which does not support Python 3.8.
I have an app made on kivy on Windows 10. I am trying to build an apk. After following the instructions I figured I have Python 3.8 installed and always got an error when trying to install kivy on the VM LUbuntu.
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.
How should I downgrade to Python 3.7?
Python 3.8: Try this
pip3 install kivy kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/
How about uninstalling Python 3.8 and then download the setup of Python 3.7 and install it.
I have installed every necessary code in Python from Kivy, but the last one I need which one is python -m pip install kivy gets me an error like this:
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.
I use windows 10, please help!
This worked for me:
matham commented 15 days ago
We are not likely to release a 1.11.1 version for 3.8 to pypi. However, you can install kivy master using:
pip install kivy[base] kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/
Try using pip install kivy==2.0.0rc2 or pip install kivy==2.0.0rc1
The command: pip install kivy==2.0.0rc2
Works with Windows 10 Pro and Python 3.8.3
And I test it with this code:
from kivy.app import App
from kivy.uix.button import Button
class TestApp(App):
def build(self):
return Button(text= " Hello Kivy World ")
TestApp().run()
This works in macOS Catalina 10.15.6 with python 3.8.0+
pip install kivy==2.0.0rc2
If you are using conda environment:
conda install -c conda-forge kivy
works in python 3.8
I am windows 10, with 3.8.2
seems pip install kivy==2.0.0rc2 worked. At least it installed.
time to tell if I can develop with it using 3.8.2
I can see openbabel 3.0.0 with pip3 search. But when I install it with pip3 install, I get only 2.4.1. Is there anything wrong? How to get the latest version installed? Thanks.
When I try to specify the version, pip does not find it. This is strange given the version on pypi is 3.0.0. https://pypi.org/project/openbabel/
$ pip3 install openbabel==3.0.0
ERROR: Could not find a version that satisfies the requirement openbabel==3.0.0 (from versions: 1.8, 1.8.1, 1.8.2, 1.8.4, 2.4.0, 2.4.1)
ERROR: No matching distribution found for openbabel==3.0.0
$ pip3 search openbabel
openbabel (3.0.0) - openbabel: Python interface to the Open Babel chemistry library
pyOBabel (0.1.1) - A python binding to openbabel chemical toolbox (http://openbabel.org)
$ pip3 install openbabel
Collecting openbabel
Using cached https://files.pythonhosted.org/packages/9c/30/eb9c3d3d3b86981f6c6a7b8eceb6f4a13b9a12673efbc842b7cebe0ce39a/openbabel-2.4.1.tar.gz
Installing collected packages: openbabel
Running setup.py install for openbabel ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/mktemp/pip-install-6d4dkzh2/openbabel/setup.py'"'"'; __file__='"'"'/private/tmp/mktemp/pip-install-6d4dkzh2/openbabel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/mktemp/pip-record-xr3vrvho/install-record.txt --single-version-externally-managed --compile
cwd: /private/tmp/mktemp/pip-install-6d4dkzh2/openbabel/
Complete output (64 lines):
running install
running build_ext
Warning: package openbabel-2.0 could not be found by pkg-config.
Guessing Open Babel location:
- include_dirs: ['/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8m', '/usr/local/include/openbabel-2.0']
- library_dirs: ['/usr/local/lib']
building '_openbabel' extension
swigging openbabel-python.i to openbabel-python_wrap.cpp
swig -python -c++ -small -O -templatereduce -naturalvar -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8m -I/usr/local/include/openbabel-2.0 -o openbabel-python_wrap.cpp openbabel-python.i
openbabel-python.i:225: Error: Unable to find 'openbabel/babelconfig.h'
openbabel-python.i:227: Error: Unable to find 'openbabel/data.h'
openbabel-python.i:228: Error: Unable to find 'openbabel/rand.h'
openbabel-python.i:229: Error: Unable to find 'openbabel/obutil.h'
openbabel-python.i:230: Error: Unable to find 'openbabel/math/vector3.h'
openbabel-python.i:232: Error: Unable to find 'openbabel/math/matrix3x3.h'
openbabel-python.i:233: Error: Unable to find 'openbabel/math/transform3d.h'
openbabel-python.i:234: Error: Unable to find 'openbabel/math/spacegroup.h'
openbabel-python.i:238: Error: Unable to find 'openbabel/base.h'
openbabel-python.i:240: Error: Unable to find 'openbabel/generic.h'
openbabel-python.i:241: Error: Unable to find 'openbabel/griddata.h'
openbabel-python.i:243: Error: Unable to find 'openbabel/chains.h'
openbabel-python.i:244: Error: Unable to find 'openbabel/typer.h'
openbabel-python.i:252: Error: Unable to find 'openbabel/plugin.h'
openbabel-python.i:257: Error: Unable to find 'openbabel/oberror.h'
openbabel-python.i:258: Error: Unable to find 'openbabel/format.h'
openbabel-python.i:259: Error: Unable to find 'openbabel/obconversion.h'
openbabel-python.i:260: Error: Unable to find 'openbabel/residue.h'
openbabel-python.i:261: Error: Unable to find 'openbabel/internalcoord.h'
openbabel-python.i:262: Error: Unable to find 'openbabel/atom.h'
openbabel-python.i:263: Error: Unable to find 'openbabel/bond.h'
openbabel-python.i:264: Error: Unable to find 'openbabel/reaction.h'
openbabel-python.i:282: Error: Unable to find 'openbabel/mol.h'
openbabel-python.i:289: Error: Unable to find 'openbabel/ring.h'
openbabel-python.i:290: Error: Unable to find 'openbabel/parsmart.h'
openbabel-python.i:291: Error: Unable to find 'openbabel/alias.h'
openbabel-python.i:292: Error: Unable to find 'openbabel/atomclass.h'
openbabel-python.i:294: Error: Unable to find 'openbabel/fingerprint.h'
openbabel-python.i:296: Error: Unable to find 'openbabel/descriptor.h'
openbabel-python.i:301: Error: Unable to find 'openbabel/forcefield.h'
openbabel-python.i:303: Error: Unable to find 'openbabel/builder.h'
openbabel-python.i:304: Error: Unable to find 'openbabel/op.h'
openbabel-python.i:306: Error: Unable to find 'openbabel/chargemodel.h'
openbabel-python.i:309: Error: Unable to find 'openbabel/phmodel.h'
openbabel-python.i:310: Error: Unable to find 'openbabel/graphsym.h'
openbabel-python.i:311: Error: Unable to find 'openbabel/isomorphism.h'
openbabel-python.i:312: Error: Unable to find 'openbabel/query.h'
openbabel-python.i:313: Error: Unable to find 'openbabel/canon.h'
openbabel-python.i:315: Error: Unable to find 'openbabel/stereo/stereo.h'
openbabel-python.i:318: Error: Unable to find 'openbabel/bitvec.h'
openbabel-python.i:321: Error: Unable to find 'openbabel/rotor.h'
openbabel-python.i:323: Error: Unable to find 'openbabel/rotamer.h'
openbabel-python.i:324: Error: Unable to find 'openbabel/spectrophore.h'
openbabel-python.i:374: Error: Unable to find 'openbabel/obiter.h'
stereo.i:1: Error: Unable to find 'openbabel/stereo/tetranonplanar.h'
stereo.i:2: Error: Unable to find 'openbabel/stereo/tetraplanar.h'
stereo.i:3: Error: Unable to find 'openbabel/stereo/tetrahedral.h'
stereo.i:4: Error: Unable to find 'openbabel/stereo/cistrans.h'
stereo.i:5: Error: Unable to find 'openbabel/stereo/squareplanar.h'
stereo.i:6: Error: Unable to find 'openbabel/stereo/bindings.h'
Error: SWIG failed. Is Open Babel installed?
You may need to manually specify the location of Open Babel include and library directories. For example:
python setup.py build_ext -I/usr/local/include/openbabel-2.0 -L/usr/local/lib
python setup.py install
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/mktemp/pip-install-6d4dkzh2/openbabel/setup.py'"'"'; __file__='"'"'/private/tmp/mktemp/pip-install-6d4dkzh2/openbabel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/mktemp/pip-record-xr3vrvho/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
open-babel 3.0.0 is installed by homebrew.
$ brew info open-babel
open-babel: stable 3.0.0 (bottled), HEAD
Chemical toolbox
https://openbabel.org
/usr/local/Cellar/open-babel/3.0.0 (328 files, 19.5MB) *
Poured from bottle on 2019-11-02 at 02:42:41
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/open-babel.rb
==> Dependencies
Build: cmake ✘, pkg-config ✔, rapidjson ✘, swig ✔
Required: cairo ✔, eigen ✔, python ✘
==> Options
--HEAD
Install HEAD version
``
From the looks of it, the maintainers of openbabel did not publish any usable distribution of the project for your system. You seem to be using Linux, but there are only pre-built wheels for Windows, and no source distribution (sdist):
https://pypi.org/project/openbabel/3.0.0/#files
You could downgrade to an earlier version, or install directly from their source code repository with something like the following:
pip install 'git+https://github.com/openbabel/openbabel.git#openbabel-3-0-0#egg=openbabel&subdirectory=scripts/python'
Note: sadly this doesn't actually work, because some files seem to require a pre-process step beforehand. There are some alternative installation instructions on this document.
Your best bet, would still be to ask the maintainers to release an sdist or Linux-wheels on PyPI.
Related issue: https://github.com/openbabel/openbabel/issues/2067