Pygame已经安装;然而,python终端说;没有名为';pygame'&引用;(Ubuntu 20.04.1)

Pygame已经安装;然而,python终端说;没有名为';pygame'&引用;(Ubuntu 20.04.1),python,python-3.x,ubuntu,installation,pygame,Python,Python 3.x,Ubuntu,Installation,Pygame,我正在使用Ubuntu20.04.1LTS。我已经用sudo安装了pygame apt get install python pygame。但是,当我使用VS代码运行代码时,python终端会给出以下输出: Traceback (most recent call last): File "path", line 1, in <module> import pygame ModuleNotFoundError: No module named 'pyga

我正在使用Ubuntu20.04.1LTS。我已经用sudo安装了pygame apt get install python pygame。但是,当我使用VS代码运行代码时,python终端会给出以下输出:

Traceback (most recent call last):
  File "path", line 1, in <module>
    import pygame
ModuleNotFoundError: No module named 'pygame'
基本上,我已经安装了pygame。那么你认为原因可能是什么呢?我的Python版本是3.8.2


提前谢谢

Python 3.8.2没有pygame 1.9.6的发布版本。安装开发版本:

python3-mpip安装pygame==2.0.0.dev10

Try
pip安装pygame==2.0.0.dev10
非常感谢!在把问题贴在这里之前,我已经连续两个小时在寻找解决方案。
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-pygame is already the newest version (1.9.6+dfsg-2build1).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.