pygame doesn't work on macOS Mojave

I was a little stuck trying to run a game I made in a windows environment a long time ago.

problem

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.

Link

--pygame module release notes https://pypi.org/project/pygame/2.0.0.dev6/#history

Recommended Posts

pygame doesn't work on macOS Mojave
Fcitx doesn't work on Flatpak
Tensorflow doesn't work!
When send_keys doesn't work
When dropbox-sdk-python doesn't work
Oh! python -m SimpleHTTPServer doesn't work on Safari and FireFox! ??
VScode intellisense doesn't work on Raspberry Pi OS 64bit! (Python)
[Python] Why pserve doesn't work
Install pygame on python3.4 on mac
Run OpenVino on macOS Catalina