I\'m trying to use kivy on my Python 2.7 project (in a PyCharm - Windows 10 environment), but I get the following error.
If someone can help me ? Thanks !
PS
Just impossible, tried all that with 3.7 64 on win10, same exception...This thing just doesn't work, guess I will have to try Beeware instead. Disappointing
Checked everything, reinstalled etc. still no luck, but after using the -d (debug) option the errormessage expanded and suggested there might be another sdl2.dll in the path. After some trial and error I found one in windows\system32. Moving it out of the way made the error disappear.
It is looking for the Kivy dependencies (e.g. sdl2) in your virtualenv.
I have encountered the same problem. I did the following and it solved the problem.
if you have not installed all dependencies then the error will occur , Instead of Project Interpreter use the pycharm terminal Then install the following
1.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_deps.angle==0.1.*
python -m pip install kivy==1.11.1
Lets be real, use a virtual environment. Kivys documentation even highly recommends this aswell.
Repeating this step always gives me a runnable kivy-example First uninstall all kivy-related librarys you already have installed.
python -m pip uninstall -y kivy.deps.glew kivy.deps.gstreamer kivy.deps.sdl2 kivy.deps.angle
Upgrade pip, wheel, setuptools and setuptools
python -m pip install --upgrade pip wheel setuptools virtualenv
Create a venv in your project folder and activate it
python -m virtualenv venv
venv\Scripts\activate
(on bash put "source" in front.)
Install kivys dependecies to your virtual environment.
python -m pip install docutils pygments pypiwin32 kivy_deps.sdl2==0.1.*
If you want video and audio support:
python -m pip install kivy_deps.gstreamer==0.1.*
On Python 3.5+ you can opt to use Angle astead glew, so do either/or:
python -m pip install kivy_deps.glew==0.1.*
python -m pip install kivy_deps.angle==0.1.*
Install kivy
python -m pip install kivy==1.11.1 kivy_examples==1.11.1
After that do
python venv\share\kivy-examples\demo\showcase\main.py
Source: https://kivy.org/doc/stable/installation/installation-windows.html
If it still errors with "[CRITICAL] [App ] Unable to get a Window, abort.", CMD:
set USE_SDL2=1
set USE_GSTREAMER=1
Terminal:
export USE_SDL2=1
export USE_GSTREAMER=1
I tried running the app in virtual environment and it worked.