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 .