如何在Mac OSX 10.9.4上卸载pygame [英] How to uninstall pygame on mac OSX 10.9.4

查看:240
本文介绍了如何在Mac OSX 10.9.4上卸载pygame的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,我遇到了我的pygame无法加载png图像且方法pygame.image.get_extended()返回0的问题,这意味着错误

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

我正在寻找解决方案,有人建议安装正确的版本 pygame可能有帮助,所以我想卸载当前的pygame并重新安装

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

但是我不知道如何在OSX上卸载pygame

But I dont know how to uninstall pygame on OSX

我在Mac上安装了2个版本的python(2.7和3.3),它们在应用程序列表中.但是众所周知,在终端中运行的mac中的默认python是操作系统本身提供的另一个python,mac中不同版本的python完全让我感到困惑.

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...

那么,如何在我的Mac ..中卸载适当python版本的pygame? 非常感谢

So, how can I uninstall pygame of the proper python version in my mac..? Thanks a lot

推荐答案

我通过在OSX中找到我的python路径来找出解决方案,并删除site-package中的pygame库.我的python站点包的路径是/Library/Python/2.7/site-packages,我删除了pygame相关文件夹以卸载pygame.

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.

卸载并重新安装pygame之后,还解决了"pygame.error:文件不是Windows BMP文件"的问题.

After I uninstall pygame and reinstall it, the problem that 'pygame.error: File is not a Windows BMP file' was also solved.

这篇关于如何在Mac OSX 10.9.4上卸载pygame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆