mac下使用pip安裝pygame包報錯解決

報錯1:

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


mac下使用pip安裝pygame包報錯解決

解決1:

<code>xcode-select --install/<code>

報錯2:

<code>src_c/_pygame.h:216:10: fatal error: 'SDL.h' file not found/<code>


mac下使用pip安裝pygame包報錯解決

解決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>


分享到:


相關文章: