Score:1

cannot import sdl2.sdlgfx: ImportError: found ['libSDL2_gfx-1.0.so.0'], but it's not usable for the library SDL2_gfx

jo flag

I've succeeded to import sdl2.sdlgfx with the latest upstream release.


When I going to import sdl2.sdlgfx, it fails. If you succeed to import, please comment how to do this.

I tried like below.

$ python3
Python 3.11.2 (main, May 30 2023, 17:45:26) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sdl2.sdlgfx
/usr/lib/python3/dist-packages/sdl2/dll.py:234: DLLWarning: TypeError("'<' not supported between instances of 'int' and 'tuple'")
  warnings.warn(repr(exc), DLLWarning)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sdl2/sdlgfx.py", line 53, in <module>
    dll = DLL("SDL2_gfx", ["SDL2_gfx", "SDL2_gfx-1.0"],
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sdl2/dll.py", line 236, in __init__
    raise RuntimeError("found %s, but it's not usable for the library %s" %
RuntimeError: found ['libSDL2_gfx-1.0.so.0'], but it's not usable for the library SDL2_gfx

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/sdl2/sdlgfx.py", line 56, in <module>
    raise ImportError(exc)
ImportError: found ['libSDL2_gfx-1.0.so.0'], but it's not usable for the library SDL2_gfx
>>>

environment:

  • Ubuntu 23.04
  • packages
    • libsdl2-2.0-0, libsdl2-gfx-1.0-0, libsdl2-image-2.0-0, libsdl2-mixer-2.0-0, libsdl2-ttf-2.0-0, python3-sdl2
mkiuchi avatar
jo flag
I've succeeded to import sdl2.sdlgfx with latest upstream release.
Score:0
sa flag

import sdl2.sdlgfx with the latest upstream release.

zx485 avatar
us flag
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - [From Review](/review/low-quality-posts/1310870)
karel avatar
sa flag
https://askubuntu.com/questions/1477593/cannot-import-sdl2-sdlgfx-importerror-found-libsdl2-gfx-1-0-so-0-but-its#comment2588181_1477593
zx485 avatar
us flag
You're right, the answer has been given in a comment by the TO 11 days _before_ your answer. I considered that to be plagiarism and therefore marked your answer for deletion. At least, you could have been so polite to create this answer as "community", don't you think?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.