-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Failed loading libtiff-5.dll: The specified module could not be found. #608
Comments
This means PPB shouldn't have to do anything. https://github.com/marcusva/py-sdl2/blob/c1bdf43501224d5f0a125dbce70198100ec7be82/sdl2/dll.py#L18-L26 (since 0.9.7). Your freeze from discord was:
|
Potentially related error, replicated in Windows 10 with a fresh Python 3.9 virtual environment set up with
|
The way to check if pysdl2dll registered correctly is to check the value of |
Ran the above, it's referencing the virtual env's pysdl2_dll install location. My dll folder there:
|
@AstraLuma Hmm, I'll take a look. From what I remember Windows OGG support works fine with pysdl2 in CI testing, but I could be wrong! |
@pathunstrom Can you try running the following code and let me know what you get? import sdl2
from sdl2 import SDL_Init, SDL_Quit
from sdl2 import sdlmixer
SDL_Init(sdl2.SDL_INIT_AUDIO)
supported = []
libs = {
'FLAC': sdlmixer.MIX_INIT_FLAC,
'MOD': sdlmixer.MIX_INIT_MOD,
'MP3': sdlmixer.MIX_INIT_MP3,
'OGG': sdlmixer.MIX_INIT_OGG,
'MID': sdlmixer.MIX_INIT_MID,
'OPUS': sdlmixer.MIX_INIT_OPUS
}
for lib in libs.keys():
flags = libs[lib]
ret = sdlmixer.Mix_Init(flags)
err = sdlmixer.Mix_GetError()
if err:
print("Error for {0}: {1}".format(lib, err))
if ret & flags == flags:
supported.append(lib)
sdlmixer.Mix_Quit()
print("Supported formats:")
print(supported)
SDL_Quit() |
OH! @pathunstrom are you using Python installed from the Microsoft store instead of Python.org? I remember another project running into trouble with Microsoft's Python because Windows store apps are stricter about which folders you can dynamically load libraries from. I'm not sure what a proper fix would look like in a pure-Python project such as pysdl2 (the other project project I mentioned used cffi and fixed it with some custom C code), but if this is indeed the problem I'd make a note in the PPB instructions that Python.org Python is required. I'll do the same for PySDL2 and pysdl2-dll if that turns out to be the case. |
Is it at least possible to check if that's the case and emit a warning? |
Apparently the answer to that is "yes" I did install through the store on this machine. That's fascinating since this definitely is a newer error for me. |
I'll get a python.org install running and test again. |
I had the error from python 3.9 from the microsoft store. I then used pyenv for windows to install a different python version and didn't have any issues importing the libraries |
@AstraLuma Do you mean check if a user is running Microsoft Store Python, or just check if there's a problem with loading dependency DLLs for mixer/image/ttf? |
@a-hurst check if they're running microsoft store python. |
It should be possible: I remember there being a command in Python to get the path of the current Python executable, since it follows a specific pattern for the MS store version (i.e. contains |
@AstraLuma Also, this is off-topic but a few months back I put a few days into getting manylinux wheels up-and-running for pysdl2-dll. I got a fair bit of it working, but I remember there being some remaining headaches (e.g. native Wayland support, WebP for |
@a-hurst oh yes please! IMHO, that is perfectly acceptable for a release--WebP isn't common in games, and there's still plenty of support for X11. |
I think I had a list of the remaining issues somewhere, I'll need to go and find it. In the meantime, I'll get my changes uploaded in a PR or something and you can try testing it out! |
@AstraLuma I'm still trying to get it fully working again (I was hacking around with it a lot last time, and seem to have broken libpng's ability to find zlib somehow), but you can see and follow my current rough progress here: https://github.com/a-hurst/pysdl2-dll/tree/manylinux. Will keep you posted on my progress. Relatedly, does PPB make use of |
Yes pursuedpybear/ppb/systems/renderer.py Lines 73 to 114 in a9dc122
|
Also, if you want to chat, you should hop by our discord. |
Simple ppb file
Stack Trace
I was able to determine that the missing libtiff-5.dll is in fact in the python site-packages.
My best guess is that the sdl_utils.py needs a
import sdl2dll
. By putting that within sdl_utils.py I was able to get passed this error, but encounter a different one.The text was updated successfully, but these errors were encountered: