Ubuntu Python 3 上的 Pygame [英] Pygame on Ubuntu Python 3
本文介绍了Ubuntu Python 3 上的 Pygame的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我到处找.我的具体问题没有答案!我有 Ubuntu,我想在 Python 3 上使用 pygame.我安装了 pygame
包
I have searched everywhere. There is no answer for my specific problem! I have Ubuntu, I want to use pygame on Python 3. I installed the pygame
package with
sudo apt-get python-pygame
但是当我输入时它不起作用
but it just doesn't work when I type
import pygame
请帮忙!
推荐答案
你必须为python3安装pip
You must install pip for python3
$ sudo apt install python3-pip
然后,安装 pip 后,安装 pygame
and then, with the pip installed, install pygame
$ pip3 install pygame
这篇关于Ubuntu Python 3 上的 Pygame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文