In fact, I meet the problem that my pygame can not load png image and the method pygame.image.get_extended() returns 0, which means false
Traceback (most recent call last): File "testpygame.py", line 5, in <module> myimage = pygame.image.load("diamond.png") pygame.error: File is not a Windows BMP file
I search for solutions and some people suggest that installing the proper version of pygame might help, so I want to uninstall my current pygame and reinstall
But I dont know how to uninstall pygame on OSX
I installed 2 versions of python on mac (2.7 and 3.3), they are in the list of applications. But as we all know that the default python in mac that runs in terminal is another one given by the operating system itself, the different versions of python in mac totally confused me...
So, how can I uninstall pygame of the proper python version in my mac..? Thanks a lot
I figure out the solution by finding my python's path in OSX, and delete the pygame library in site-package. My python's site-package's path is /Library/Python/2.7/site-packages, and I delete the pygame relevant folders here to uninstall pygame.
After I uninstall pygame and reinstall it, the problem that 'pygame.error: File is not a Windows BMP file' was also solved.
Just wanted to add a quick correction to the path of pythons site package to the above mentioned answer - It should look something like this
" /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame"
I uninstalled pygame using pip & this is the output on the console.
My copy of pygame was installed via the disk image (.dmg) from this download page, which contains a package installer (.mpkg). You can attempt to uninstall the package, but that didn't work for me. Using the Suspicious Package app, I can look at the installer to see what it installs.
For the 1.9.1 version of Pygame, it installs the following:
You can manually delete all of these files to clear pygame from your system.
Note that
Python.framework
is where all user-installed versions of Python go to. If you are sure that you do not have a user-installed version of Python, you can delete it entirely. Otherwise, you should surgically remove the pygame parts as shown above.