I was a little stuck trying to run a game I made in a windows environment a long time ago.
Execution environment
A little research reveals something like this https://github.com/pygame/pygame/issues/555
After all it seems that macOS and the default pygame are not compatible, specify the version and make it the latest one (as of December 12, 2019).
# pygame1.9.Uninstall 6
> pip uninstall pygame
Uninstalling pygame-1.9.6:
Would remove:
/usr/local/var/pyenv/versions/3.6.5/include/python3.6m/pygame/_camera.h
/usr/local/var/pyenv/versions/3.6.5/include/python3.6m/pygame/_pygame.h
...
/usr/local/var/pyenv/versions/3.6.5/lib/python3.6/site-packages/pygame/*
Proceed (y/n)? y
Successfully uninstalled pygame-1.9.6
#Install pygame by specifying version
> pip install pygame==2.0.0.dev6
Collecting pygame==2.0.0.dev6
Downloading https://files.pythonhosted.org/packages/be/1d/03caf4447ff3f9b4a89e169a35360c95eeaa5f9c4d1312a619ce2b23e5a8/pygame-2.0.0.dev6-cp36-cp36m-macosx_10_11_intel.whl (5.5MB)
|████████████████████████████████| 5.5MB 3.4MB/s
Installing collected packages: pygame
Successfully installed pygame-2.0.0.dev6
#Verification
> pip freeze
...
pygame==2.0.0.dev6
It worked safely.
--pygame module release notes https://pypi.org/project/pygame/2.0.0.dev6/#history
Recommended Posts