首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何强制Pygame 2.0.0使用最新版本的SDL?

如何强制Pygame 2.0.0使用最新版本的SDL?
EN

Stack Overflow用户
提问于 2020-12-24 15:42:34
回答 1查看 1K关注 0票数 1

您在以下方面的帮助将不胜感激。

我正在开发一个用于RPi触摸屏应用程序的python项目。这在SDL 2.0.9上有一些问题,但应该在以后的版本中得到解决。我已经编译安装了2.0.14,但Pygame坚持使用SDL 2.0.9 (apt中的最新版本)。

如何强制Pygame使用编译后的版本?

谢谢!J

SDL 2.0.9中出现的问题(触摸时出现):

代码语言:javascript
运行
复制
pygame 2.0.0 (SDL 2.0.9, python 3.7.3)
Hello from the pygame community. https://www.pygame.org/contribute.html    
INFO: The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL forums/mailing list <https://discourse.libsdl.org/> EVDEV KeyCode 330

安装的SDL版本(来自apt):

代码语言:javascript
运行
复制
dpkg -l | grep sdl

ii  libsdl2-2.0-0:armhf                  2.0.9+dfsg1-1+rpt1                  armhf        Simple DirectMedia Layer
ii  libsdl2-2.0-0-dbgsym:armhf           2.0.9+dfsg1-1+rpt1                  armhf        debug symbols for libsdl2-2.0-0
ii  libsdl2-image-2.0-0:armhf            2.0.4+dfsg1-1+deb10u1               armhf        Image loading library for Simple DirectMedia Layer 2, libraries
ii  libsdl2-mixer-2.0-0:armhf            2.0.4+dfsg1-1                       armhf        Mixer library for Simple DirectMedia Layer 2, libraries
ii  libsdl2-ttf-2.0-0:armhf              2.0.15+dfsg1-1                      armhf        TrueType Font library for Simple DirectMedia Layer 2, libraries

编译版本:

代码语言:javascript
运行
复制
/usr/local/bin/sdl2-config --version

2.0.14
EN

回答 1

Stack Overflow用户

发布于 2020-12-25 13:28:20

我刚刚在python 3.7.3 (你已经有的版本)、3.7.6 (我想是最新的3.7.x版本)和python 3.9.1 (最新的稳定版本)中安装了pygame。在所有这些版本中,我得到的都是SDL 2.0.14。因此,您可能只需要删除现有的SDL和pygame,重新安装pygame应该会得到更新版本的SDL。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65435402

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档