Closed mgedmin closed 7 years ago
This is blocked on my being unable to get PyGame for Python 3.x (the apt-get-installable package doesn't support Python 3; pip install pygame --pre --allow-unsecure pygame
fails to build due to missing kernel header).
I have successfully installed pygame-1.9.2a0.win32-py3.2.msi 6.4MB on python 3.5 (has a nice windows install, not requiring pip or python setup.py) but import pygame gives me ImportError: No module named 'pygame' I'm baffled. unable to open a new issue myself, so please excuse me for raising it here.
OK the win install put pygame in the wrong place. moved it to site-packages. Now I get from pygame.base import * gives: ImportError: DLL load failed: %1 is not a valid Win32 application.
looking further into the pygame directory, most of these modules referrred to by init do not exist:- from pygame.base import from pygame.constants import from pygame.version import * from pygame.rect import Rect from pygame.compat import geterror from pygame.rwobject import encode_string, encode_file_path import pygame.surflock import pygame.color
After reinstalling with the inwtall package in my python directory, all the files seem to be present ok.
But I still get:
import pygame, pygame.surfarray
File "C:\Python\Python35\lib\site-packages\pygameinit.py", line 95, in
There's some progress on this front in the py3
branch, but the game fails after a few seconds with
Traceback (most recent call last):
File "./pyspacewar", line 31, in <module>
main()
File "./src/pyspacewar/main.py", line 70, in main
ui.wait_for_tick()
File "./src/pyspacewar/ui.py", line 2737, in wait_for_tick
self.update_missile_trails()
File "./src/pyspacewar/ui.py", line 2688, in update_missile_trails
for missile, trail in self.missile_trails.items():
RuntimeError: dictionary changed size during iteration
PyGame supports Python 3.2+ since version 1.9.2.
Checklist:
tox
sitepackages = true
lets me use apt-get installed pygame, which is available for Python 2.7 onlytox
using Python versions other than 2.7