報錯1:
<code>xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun/<code>

解決1:
<code>xcode-select --install/<code>
報錯2:
<code>src_c/_pygame.h:216:10: fatal error: 'SDL.h' file not found/<code>

解決2:
<code>brew install sdl sdl_image sdl_mixer sdl_ttf portmidi/<code>
最後安裝正常:
<code>pip install pygame -i https://mirrors.aliyun.com/pypi/simple//<code>
閱讀更多 ITCAN 的文章