Python 安装smpeg时出错

Python 安装smpeg时出错,python,package,pygame,Python,Package,Pygame,我正在尝试安装pygame,它依赖于“smpeg” 我在运行此行时遇到以下错误: site-packages user$ brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi Error: smpeg is a head-only formula Install with `brew install --HEAD smpeg` 所以我试着: user$ brew install --HEAD smpeg Warning: smp

我正在尝试安装pygame,它依赖于“smpeg”

我在运行此行时遇到以下错误:

site-packages user$ brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi
Error: smpeg is a head-only formula
Install with `brew install --HEAD smpeg`
所以我试着:

user$ brew install --HEAD smpeg
Warning: smpeg-HEAD already installed
所以不确定如何避免错误

当我尝试运行python游戏时,遇到一个错误,即无法处理.png文件:

  File "SwingyMonkey.py", line 262, in <module>
    game = SwingyMonkey()
  File "SwingyMonkey.py", line 63, in __init__
    self.background_img = pg.image.load('res/jungle-pixel.png').convert()
pygame.error: File is not a Windows BMP file
文件“swingmonkey.py”,第262行,在
游戏=SwingMonkey()
文件“SwingMonkey.py”,第63行,在_init中__
self.background\u img=pg.image.load('res/jungle pixel.png').convert()
pygame.error:文件不是Windows BMP文件
我认为这与之前的错误有关