为了学习python,我刚刚在我的Linuxubuntu16.04中安装了pygame。
当我试图在geany中导入游戏时,它不起作用,它显示:
Traceback (most recent call last):
File "ttest2.py", line 1, in <module>
import pygame
ImportError: No module named 'pygame'
当我在我的终端导入玩偶游戏时,它可以工作。
我也不知道原因。我怎么能在我的geany里进口玩偶游戏?
发布于 2019-01-20 06:40:34
Geany使用lib。Pygame是为Python2.7安装的,而不是3.x,与其他环境不同。因此,您也必须为Python2.7安装它:
sudo apt-get install python-pip
pip install pygame
https://stackoverflow.com/questions/42696536
复制相似问题