如何在Debian jessie上安装pygame for Python 3?

2024-05-16 12:00:26 发布

您现在位置:Python中文网/ 问答频道 /正文

我曾多次尝试为Python 3.5安装pygame,但都没有成功。 例如,我尝试了this,但出现了以下错误:

$ python3
>>> import pygame
enter code hTraceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'pygame'
>>>

在构建和安装时,一切看起来都很好,但我仍然没有看到任何变化。我忘了什么吗?有什么不对劲吗


Tags: importmost错误stdincodecallthispygame
2条回答

只要做:

$ sudo pip3 install pygame

我在debian 8上遇到了同样的问题,我升级了pip:

sudo python3 -m pip install  upgrade pip

我使用Pygame website中的代码安装了pygame:

python3 -m pip install pygame  user

相关问题 更多 >