pygame的字体画不出来_Python pygame使用字体时出错:没有这样的文件或目录

我有一个python pygame程序,它模拟赛车,驾驶和躲避街区,这个程序100%工作直到今天我尝试它,现在它给我一个错误,错误是:Warning (from warnings module):

File "/home/vandeventer/Documents/Pieter/pygame.resies.py", line 50

largeText = pygame.font.Font(None,75)

RuntimeWarning: use font: libSDL_ttf-2.0.so.0: cannot open shared object file: No such file or directory

(ImportError: libSDL_ttf-2.0.so.0: cannot open shared object file: No such file or directory)

Traceback (most recent call last):

File "/home/vandeventer/Documents/Pieter/pygame.resies.py", line 151, in

begin()

File "/home/vandeventer/Documents/Pieter/pygame.resies.py", line 29, in begin

message_display(over)

File "/home/vandeventer/Documents/Pieter/pygame.resies.py", line 50, in message_display

largeText = pygame.font.Font(None,75)

File "/usr/local/lib/python3.4/dist-packages/pygame/__init__.py", line 74, in __getattr__

raise NotImplementedError(MissingPygameModule)

NotImplementedError: font module not available

(ImportError: libSDL_ttf-2.0.so.0: cannot open shared object file: No such file or directory)

这让我觉得我使用的字体有些问题,这真的非常令人沮丧,我真的看不出任何错误,以下是我的代码:

^{pr2}$

我使用字体的唯一部分是在message_display()和things\u dodged()中

我真的需要帮助,谢谢

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值