0

我不断收到这些错误,例如: NameError: name 'mouse' is not defined or NameError: name 'screen' is not defined, etc.

这是我在 Python shell 中的完整错误消息: 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] Python Type "help", "copyright", "credits" or "license" for more information. [evaluate ourGame.py] Traceback (most recent call last): File "/Volumes/PATRIOT/Our Game/ourGame.py", line 44, in <module> NameError: name 'mouse' is not defined

我已经安装了 Python 2.7.8 32 位、Pygame 32 位和 Livewires 库。

我已经使用以下行导入了 Livewires 库: from livewires.beginners import *

这是我收到错误的地方: mouse.is_visible = False

这可能是因为我没有正确安装 Pygame 或 Livewires,但是当我在 Python 命令窗口中输入以下内容时,我没有收到错误:

from livewires import beginners from livewires import games

4

0 回答 0