Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/282.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Livewires&x2B;Pygame错误_Python_Pygame_Importerror_Livewires - Fatal编程技术网

Python Livewires&x2B;Pygame错误

Python Livewires&x2B;Pygame错误,python,pygame,importerror,livewires,Python,Pygame,Importerror,Livewires,因此,我正在运行安装了python 3.3的Windows 8。我已经安装了livewires和pygame 但当我运行代码时: from livewires import games games.init(screen_width = 640, screen_height = 480, fps = 50) games.screen.mainloop() 我得到一个错误,说。。。ImportError:没有模块名“pygame.image” 有人知道如何解决这个问题吗?您是否在python

因此,我正在运行安装了python 3.3的Windows 8。我已经安装了livewires和pygame

但当我运行代码时:

from livewires import games

games.init(screen_width = 640, screen_height = 480, fps = 50)

games.screen.mainloop()
我得到一个错误,说。。。ImportError:没有模块名“pygame.image”


有人知道如何解决这个问题吗?

您是否在python解释器的文件目录中安装了pygame?但无论如何,pygame目前不适用于Python3.3。如果您想使用Python3进行编码,我建议使用3.1.1或3.2,并使用Python2.7.12使用pyinstaller将它们编译成.exe文件,因为pip与3.1.1和3.2不兼容。您还可以用python 2编写代码。如果您阅读发行版模块目录中的,我建议您使用2.7.12,您将看到它是在2013年9月25日提交的,并特别指出:

您将需要Python来使用该包。Python可从以下位置获得:。如果您是第一次安装,我们建议您使用Python 2.2.3


我认为livewires很可能无法与Python 3一起使用。

脚本的文件名是什么?脚本的文件名是new\u graphics\u window.py。同一目录中是否有pygame.py脚本?你能只导入pygame吗?pygame本地人怎么样?