I\'m getting what seems to be a common error running the Kivy hello world program. I\'ve tried the solutions I\'ve seen here: manually install gstreamer
, adding
I'm using windows 10 and python 3.6, and I installed kivy using pip. None of above solution helped, but then I uninstall the kivy with pip, and install kivy again with conda according to https://kivy.org/doc/stable/installation/installation-windows.html#installation and it worked.
The packages conda installed for me are: The following packages will be downloaded:
package | build
---------------------------|-----------------
freetype-2.8.1 | vc14_0 469 KB conda-forge
sdl2_mixer-2.0.4 | h6538335_0 83 KB conda-forge
sdl2-2.0.10 | h6538335_0 4.3 MB conda-forge
kivy-1.11.1 | py36hbc14df2_0 20.2 MB conda-forge
sdl2_image-2.0.2 | 0 293 KB conda-forge
glew-2.0.0 | he025d50_1002 722 KB conda-forge
sdl2_ttf-2.0.14 | h8909db8_1 25 KB conda-forge
smpeg2-2.0.0 | h6538335_1 131 KB conda-forge
------------------------------------------------------------
In cmd go to python34 and then to Scripts and install the following:
pip install --upgrade pip wheel setuptools
pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
pip install kivy.deps.gstreamer
pip install kivy.deps.angle
pip install kivy
I just found a quick fix
pip
multisamples = 0
from = 2
then restart your
computer. This will save other issues too like[CRITICAL] [GL ] Minimum required OpenGL version (2.0) NOT found!
This worked for me on windows 7 64 bit, python3.5(32 bit) with Kivy version 1.10.0
Disable the 3D acceleration and the 2D video acceleration in the display settings of the virtual software (aka vmbox, vmware). I think this will work for you , it works for me after lots of tries.
Try putting <python dir>\share\sdl2\bin
to your path, it should do the trick. The thing is that it can't find the sdl2 binary it works with. There probably even isn't any PIL window provider, so using environment variable won't do a thing for creating a window (it'll be used as an image provider though).
I'm not really familiar with PySDL2, so I can't help you with that, however I made an installer for Kivy on Windows to make things easier for beginners.
There are basically two ways you'll end up with anyway:
You'll put the bin
folders to a PATH
variable permanently
I consider it really stupid unless you're sure you won't delete Python or the folder, otherwise you'll have a ghost folder in PATH
+ all other programs will have an access to files in bin
folders via PATH
You'll have a batch file that does that temporarily
Only programs ran from the console/batch will have an access to the bin
folder.
The installer does that for you and in fact does even installing from scratch (no Python) or many other things.
In case you haven't installed the Kivy dependencies, please do it first.
Not sure about Windows or Linux, but on python-for-android at the very top you need to put:
#qpy:kivy
import kivy
kivy.require('1.10.1') # replace with your current kivy version !