Livewires + Pygame Error

2019-08-23 08:00发布

So I am running Windows 8 with python 3.3 installed. I have livewires and pygame installed.

But when I run the code:

from livewires import games

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

games.screen.mainloop()

I get an error saying... ImportError: No module name 'pygame.image'.

Does anyone know how to fix this?

2条回答
SAY GOODBYE
2楼-- · 2019-08-23 08:28

Did you install pygame in the file directory of the python interpreter? But anyway pygame is not available for python 3.3 at the moment. If you want to use python 3 for coding, I would recommend 3.1.1 or 3.2, and use python 2.7.12 to compile them into an .exe file with pyinstaller, because pip is not compatible with 3.1.1 and 3.2. You can also write the code in python 2. I would recommend 2.7.12

查看更多
孤傲高冷的网名
3楼-- · 2019-08-23 08:46

If you read the README.md file in the distro's module directory, you'll see that it was committed on September 25, 2013 and specifically states:

You will need Python to use the package. Python can be obtained from: http://www.python.org/download/. If you're installing for the first time, we recommend you use Python 2.2.3

I think it's quite likely that livewires will not work with Python 3.

查看更多
登录 后发表回答