-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kivy sdl2 DLL Load failed #5677
Comments
what does this say on your system (PowerShell): python -m pip freeze | select-string cython |
@dolang it says |
yeah, sorry that wasn't clear. You need to execute that in PowerShell. It's the replacement for the DOS prompt. Use |
Oh okay. In the powershell it says
|
Alright, tried to reproduce it with a similar not same environment without luck. Bascially, what the error says is that the I'll have to try reproducing this on another machine again, you could try to |
Tried on another machine now, getting the same result (i.e. it works here). What do you have for: PS C:\> python -m pip freeze | select-string sdl2 it should give you: Alternatively, if you have several Python interpreters installed: PS C:\> py -3.6 -m pip freeze | select-string sdl2 If one of these two commands doesn't give you the output above, try reinstalling If they do and it doesn't work, please paste what you get with: PS C:\> dir C:\Users\dev.DoddJ\AppData\Local\Programs\Python\Python36-32\share\sdl2\bin Maybe you have to reinstall the 64-bit Python interpreter. (Just a guess, not sure yet.) |
I did that and
I have uninstalled 32-bit and installed 64-bit Python in its place, however, still get this error
|
Well, I wasn't sure if 32/64-bit could be the problem here. But can you look if the PS C:\> dir C:\Users\dev.DoddJ\AppData\Local\Programs\Python\Python36\share\sdl2\bin If it's there, maybe your virus scanner is blocking it, or your firewall (or some other really intrusive software)? This is not something that should happen, imho. Edit: had a look at my installation again and opened a running application in Process Hacker. This SDL2.dll is custom-built for PyPI and it looks like it's unsigned. Depending on your Windows policy settings, it could be blocked automatically because of that. Maybe the following can help? |
According to earlier comment, you have cython 0.27.3 and the console log says Kivy v1.10.0 ... those versions are not compatible, though I'm not sure exactly why the missing window provider is the first clue to this problem.... Maybe try either using cython 0.25.2 (compatible with 1.10) + reinstall kivy, or alternatively |
I am getting this issue also with
running it gives the following:
Despite the existence of the SDL2 DLL:
|
and I should add that this occurs even if I uninstall
It doesn't even work if I |
Alright, there are several things at play here:
So far I've been unable to reproduce it, but 3. is something that can't be excluded. Another thing you could try: open a command prompt and point the PATH directly at the sdl2 folder. Something like:
|
@dolang Well, it seems that adding the
I confirmed by repeatedly adding and removing that from the PATH that the presence of |
Now, the |
Aha! So, on Windows, it can be "solved" by prepending
But unfortunately this is not a solution per se How ARE the pip-installed-python-libraries supposed to make their way into the |
That was just a clue for me to find out whether the libraries are actually blocked or not. Good thing they aren't. As said above (point 2.), you can see that if you open the |
Is this of any use?
|
Well, some further testing reveals that it functions correctly if BOTH I think the problem lies with too much being hardcoded into I wonder if there's a more canonical way to add DLLs from Pip packages into the |
Good question, but I don't know how the team arrived at their current solution. At least we could narrow it down now, so that's a step forward. By the way, are you familiar with
Normal user account (
optionally add: Hope I got that all right. |
Configuration windows 10 python 363 (visual studio 2017):
I 've got same issue and I solve it and my solution is not a good one. I copy all dlls (share/sdl2 share/angle share/glew share/gstreamer) in a repository and I add this repository to path variable. I installed kivy using admin right (https://kivy.org/docs/installation/installation-windows.html) and i tried to run using user right (user laurent )then error happens : [CRITICAL] [Window ] Unable to find any valuable Window provider. Copying all dlls in new folder solves issues. My question is then How can I install kivy to run kivy with user privilege ? PS sorry I 'm not good in english and python |
I tried using virtualenv and it did not work. I still got a similar error. I also added I'm using python 3.7 so I installed Logs:
|
On this issue, i've seen mixing libraries architectures (Python in 64 bits, SDL2 in 32 bits), so that's a first stop. And yes, if you mixed the arch, the libraries won't be used at all and Kivy won't work. |
I am using python 3.7 and i am getting this error. kivy version is 1.10.1 |
same here python 3.7 , kivy version is 1.10.1 and tried all ways to load the DLL but shows no mercy. |
Please see #6342. |
This Solve My Problem Which is The same one you Had |
I had the same issue. This video may help those who are visual! https://youtu.be/gt-qndBYrCQ |
Had many issues, but managed to work them out. Here's what I learned (using PyCharm):
Hope this helps someone!!!! |
Try to manually copy glew,sdl2 folders and init.py from ../site-packages/kivy_deps to ../site-packages/kivy/deps. |
For windows 10 If I am installing in a non standard path without virtenv, this works for me:
Apparently there are some issues with sdl2 dependency installation on windows. I don't know exactly what is the problem. It might have something to do with the fact that sdl2 package is installing the wrong version of libpng16-16.DLL(206KB). Another solution might be to copy the libpng16-16.DLL(2MB) from gstreamer to your app folder if you get a SDL2_image error. #6335 On MacOS Big Sur: I had to clear the code signing on the sdl2 libs in order to start the app. Found the solution in this pyinstaller commit pyinstaller/pyinstaller@de511a1
|
This also appears to fail with Microsoft Store versions of Python, as the |
You are a lifesaver! uninstalling and then reinstalling the kivy.deps.sdl2 in the cmd did it for me. I was up late trying to fix this. Thank you so much! |
Gosh... thank you guys, you saved me a lot of time ^^. |
python -m pip install --upgrade pip wheel setuptools
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
python -m pip install kivy.deps.gstreamer
python -m pip install kivy.deps.angle
python -m pip install kivy
python -m pip install kivy_examples
python -m pip install Pillow
python -m pip install cython
python -m pip install PyEnchant
Description
Hi, I am trying to run the example code from the install Kivy. The following is the error I receive back. Any help would be great. I have tried looking at previous enquiries about similar problems, but nothing suggested on them has worked so far.
Code and Logs
Code that I am trying to run:
The text was updated successfully, but these errors were encountered: