当我from pgu import pgu as pgui
得到以下异常时:
Traceback (most recent call last):
File "C:/path/pyspace/main.py", line 3, in <module>
from simulator.game import Game
File "C:\path\pyspace\simulator\game.py", line 5, in <module>
from simulator.guis.simulategui import SimulateGUI
File "C:\path\pyspace\simulator\guis\__init__.py", line 2, in <module>
from simulator.guis.simulategui import SimulateGUI
File "C:\path\pyspace\simulator\guis\simulategui.py", line 5, in <module>
from pgu import gui as pgui
File "C:\Program Files (x86)\Python35-32\lib\site-packages\pgu\gui\__init__.py", line 21, in <module>
from .container import Container
File "C:\Program Files (x86)\Python35-32\lib\site-packages\pgu\gui\container.py", line 57
except StyleError,e:
当我...\gui\container.py
用 pycharm 打开时,有一个错误告诉我Python version 3.5 does not support this syntax
。container.py
in中的语法pgu
如下:
try:
# This hack isn't perfect and so it's not enabled by default, but only by
# themes that explicitly request it.
alpha = pguglobals.app.theme.getstyle("pgu", "", "themealpha")
except StyleError,e:
alpha = False
我正在使用 pygame 1.9.2a0 和 pgu 0.18 运行 python 3.5.1。我是否需要为 pygame 安装不同版本的 pgu 或不同版本的 GUI 管理器,或者有没有简单的方法来解决这个问题?我假设我要安装一个不同的 GUI 管理器;但希望有一个简单的解决方法。