Pygame 错误:文件不是 windows BMP 文件 [英] Pygame Error: File is not a windows BMP file
问题描述
我在学习这个教程时遇到问题.我运行后弹出错误提示
I'm having problem following this tutorial. After I run it, an error message pops up
"ball = pygame.image.load("...) 错误:文件不是 Windows BMP 文件.
"ball = pygame.image.load("...) Error:File is not a Windows BMP file.
我使用的是 OSX 10.9.5
I'm on OSX 10.9.5
我非常怀疑我搞砸了所有必要组件的安装,我安装时的步骤如下:
I highly suspect I messed up the installation for all the necessary components, and the my steps are the following when I install:
- 删除 Python 3 并重新安装 Python 2.7 32 位版本(使用 .dmg)
- 使用 .dmg 安装 pygame 包
- 被要求安装X11,安装X11
- 打开 SDL 框架 .zip 并将其拖放到应用程序/库中的文件夹中
我搞砸了吗?特别是对于 SDL?请告诉我解决方案,谢谢.
Did I mess it up? Especially for the SDL? Please tell me the solution, thank you.
//尝试将图片文件放在同一目录下;将图像文件另存为 .bmp
//Tried putting the image file in the same directory; saving the image file as .bmp
推荐答案
我按照这里的解决方案 回答.前往 Macintosh HD/Library/Frameworks/..... 并删除其中的 pygame 文件夹并重新安装.
I followed the solution here answer. Head to Macintosh HD/Library/Frameworks/..... and delete the pygame folder within and reinstall.
这篇关于Pygame 错误:文件不是 windows BMP 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!