嘗試了幾乎所有可以在搜尋中找到的東西。無法繞過此錯誤。使用 pip3 安裝了 pygame。
$ python3 -m pygame.examples.aliens
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
2019-03-26 00:52:36.610 Python[86073:400104] 00:52:36.609 WARNING: 140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.
Illegal instruction: 4
然後Python退出。
答案1
再次嘗試並在這裡找到了這個:https://gist.github.com/connorshea/f539c91f210e72077ca9#gistcomment-2079353
Blockquote 此外,這些步驟都不再需要了。這曾經是 OS X 的首選方法,但幾個月前 Pygame 發行版進行了更新,現在針對所有平台您需要做的就是:
pip install pygame