M1 MAC安装pygame


1. 先安装下面这些库:

brew install hg sdl sdl_image sdl_ttf sdl2 sdl2_image pkgconfig sdl_mixer portmidi

如果没有找到,需要brew更换阿里源,更换方式见:https://www.cnblogs.com/mrlonely2018/p/15174983.html

2. git clone git@github.com:pygame/pygame.git

3. 进入repo,执行pip install .