NameError

Thomas Nyberg tomuxiong at gmx.com
Thu Nov 24 09:59:17 EST 2016


On 11/24/2016 09:00 AM, Cai Gengyang wrote:
> CaiGengYangs-MacBook-Pro:~ CaiGengYang$ import pygame
> -bash: import: command not found

That indicates you're running "import pygame" at the bash interpreter 
prompt. You should first start "python" (type the word python without 
quotes and press enter) which starts the python interpreter. You should 
see this: ">>>". After this, then type "import pygame". See if that works.

Cheers,
Thomas




More information about the Python-list mailing list