When I download pygame-1.9.2b8-cp36-cp36m-win32.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame I turn it into zip, take the headers in the pygame-1.9.2b8.data fo
You probably have python installed for 32-bit. Uninstall and the install the 64-bit version. After that,
pip3 uninstall pygame
pip3 install pygame
try usin pip3 install pygames to install pygames
pip3 install pygame
MACOS SOLUTION
This might work for all operating systems, I am not quite sure.
A long explanation short. Pygame comes pre-installed with all newer versions of Python which may or may not cause directory management a bit confusing and hard for your OS to handle. When you reinstall/install Pygame via pip3 install pygame
Many instances of the same Pygame directory are created on your computer. You have to manually find them and delete them. I've deleted one of the instances from the following directory on my MAC:
/Library/Frameworks/Python.framework/versions/3.8/lib/Python3.8
I found the pygame directory and deleted it and then pygame started working in pycharm and in IDLE.
So for this question what I recommend is to delete the pygame directory from this directory that the error message is pointing to. Prior to the steps I've pointed out in my solution.
Use pip3 tool to reinstall the pygame python module:
C:\Python373\Scripts>pip3 uninstall pygame
C:\Python373\Scripts>pip3 install pygame
Then install it:
C:\Python373\Scripts>pip install pygame-menu==2.0.1
This error bugged me for months, what i did was:
Uninstalled the package
pip3 uninstall pygame
Purged the pip cache
pip cache purge
Finally...Reinstalled pygame using pip3
pip3 install pygame
Worked like a charm :)