pygame导入错误:没有名为freetyp的模块

2024-10-01 09:33:02 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在做一个小项目,在这个项目中我需要自由打字。 但我得到的只是错误。在

slu-suse:~/Systemthegame # python main-noclick.py
Traceback (most recent call last):
  File "main-noclick.py", line 204, in <module>
    if __name__ == '__main__': menu()
  File "main-noclick.py", line 6, in menu
    import pygame, pygame.freetype
ImportError: No module named freetype

我确实尝试过重新安装pygame,但是在包含Python.h之后,gcc错误1失败了。 但我不明白,因为'whereis Python.h'返回了Python:'

如果有帮助的话,我会上openSUSE。在


Tags: 项目inpymain错误linepygamefile