由于两个错误,我无法使用pip在Mac上安装Pygame

发布时间:2020-07-06 17:44

我正在尝试在Mac中安装模块Pygame,但始终出现错误。我已经安装了pip,所以不确定是否出了问题。我已经尝试过:sudo pip install pygamesudo pip3 install pygame,而这两个都没有sudo。如果您能提供帮助,我将不胜感激,谢谢!这是错误消息(一些最重要的消息): error: command 'gcc' failed with exit status 1

In file included from src_c/gfxdraw.c:33:
  In file included from src_c/pygame.h:32:
  src_c/_pygame.h:216:10: fatal error: 'SDL.h' file not found
  #include <SDL.h>
回答1