【问题标题】:How can I install pygame for Python 3 on Debian jessie?如何在 Debian jessie 上为 Python 3 安装 pygame?
【发布时间】:2017-01-24 10:54:36
【问题描述】:

我多次尝试为 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'
>>>

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

【问题讨论】:

  • 您是否尝试使用pip3 install pygame 进行安装?它适用于基于 Ubuntu 的 Linux Mint,它基于 Debian。顺便说一句:昨天我将 PyGame 更新到 1.9.3
  • 当然我试过了,但是这次成功了 0,0 你是怎么做到的?我发誓我尝试了 1 年,我从来没有得到解决方案,BAM,这是我第一次尝试,现在它成功了......你解决了所有这样的问题吗?因为如果你这样做,我有一个巨大的清单:)
  • 据我所知,pygame 作者 6 个月前在 EuroPython 上作为 Sprint 制作了新包 - 你甚至可以在 PyGame 页面上看到新闻:pygame.org/news.html

标签: python python-3.x pygame debian


【解决方案1】:

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

sudo python3 -m pip install --upgrade pip

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

python3 -m pip install pygame --user

【讨论】:

    【解决方案2】:

    只要做:

    $ sudo pip3 install pygame
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-13
      • 1970-01-01
      • 1970-01-01
      • 2017-05-10
      • 2016-12-08
      • 2018-11-14
      • 2016-01-05
      • 1970-01-01
      相关资源
      最近更新 更多