<small id='u3wxn'></small><noframes id='u3wxn'>

    • <bdo id='u3wxn'></bdo><ul id='u3wxn'></ul>
  • <i id='u3wxn'><tr id='u3wxn'><dt id='u3wxn'><q id='u3wxn'><span id='u3wxn'><b id='u3wxn'><form id='u3wxn'><ins id='u3wxn'></ins><ul id='u3wxn'></ul><sub id='u3wxn'></sub></form><legend id='u3wxn'></legend><bdo id='u3wxn'><pre id='u3wxn'><center id='u3wxn'></center></pre></bdo></b><th id='u3wxn'></th></span></q></dt></tr></i><div id='u3wxn'><tfoot id='u3wxn'></tfoot><dl id='u3wxn'><fieldset id='u3wxn'></fieldset></dl></div>
  • <tfoot id='u3wxn'></tfoot>

      1. <legend id='u3wxn'><style id='u3wxn'><dir id='u3wxn'><q id='u3wxn'></q></dir></style></legend>

      2. Pygame 已经安装;但是,python 终端说“没有名为 'pygame' 的模块"(Ub

        Pygame already installed; however, python terminal says quot;No module named #39;pygame#39; quot; (Ubuntu 20.04.1)(Pygame 已经安装;但是,python 终端说“没有名为 pygame 的模块(Ubuntu 20.04.1))
          <tbody id='xMtBk'></tbody>

          <bdo id='xMtBk'></bdo><ul id='xMtBk'></ul>
            <tfoot id='xMtBk'></tfoot>
            <i id='xMtBk'><tr id='xMtBk'><dt id='xMtBk'><q id='xMtBk'><span id='xMtBk'><b id='xMtBk'><form id='xMtBk'><ins id='xMtBk'></ins><ul id='xMtBk'></ul><sub id='xMtBk'></sub></form><legend id='xMtBk'></legend><bdo id='xMtBk'><pre id='xMtBk'><center id='xMtBk'></center></pre></bdo></b><th id='xMtBk'></th></span></q></dt></tr></i><div id='xMtBk'><tfoot id='xMtBk'></tfoot><dl id='xMtBk'><fieldset id='xMtBk'></fieldset></dl></div>

                <small id='xMtBk'></small><noframes id='xMtBk'>

              1. <legend id='xMtBk'><style id='xMtBk'><dir id='xMtBk'><q id='xMtBk'></q></dir></style></legend>

                • 本文介绍了Pygame 已经安装;但是,python 终端说“没有名为 'pygame' 的模块"(Ubuntu 20.04.1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我使用的是 Ubuntu 20.04.1 LTS.我已经使用 sudo apt-get install python-pygame 安装了 pygame.但是,当我使用 VS 代码运行我的代码时,python 终端会给出以下输出:

                  I'm using Ubuntu 20.04.1 LTS. I have installed pygame with sudo apt-get install python-pygame. However, when I run my code using VS code, the python terminal gives the output below:

                  Traceback (most recent call last):
                    File "path", line 1, in <module>
                      import pygame
                  ModuleNotFoundError: No module named 'pygame'
                  

                  我尝试使用相同的命令重新安装 Pygame.这是输出:

                  I tried to reinstall Pygame using the same command. Here is the output:

                  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.
                  

                  基本上,我已经安装了 pygame.那么您认为可能是什么原因呢?我的 Python 版本是 3.8.2.

                  Basically, I already have pygame installed. So what do you think might be the reason? My Python version is 3.8.2.

                  提前致谢!

                  推荐答案

                  没有针对 Python 3.8.2 的 pygame 1.9.6 的发布版本.安装开发版本:

                  There isn't a release build of pygame 1.9.6 for Python 3.8.2. Install a development version:

                  python3 -m pip install pygame==2.0.0.dev10
                  

                  这篇关于Pygame 已经安装;但是,python 终端说“没有名为 'pygame' 的模块"(Ubuntu 20.04.1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Split a Pandas column of lists into multiple columns(将 Pandas 的列表列拆分为多列)
                  How does the @property decorator work in Python?(@property 装饰器在 Python 中是如何工作的?)
                  What is the difference between old style and new style classes in Python?(Python中的旧样式类和新样式类有什么区别?)
                  How to break out of multiple loops?(如何打破多个循环?)
                  How to put the legend out of the plot(如何将传说从情节中剔除)
                  Why is the output of my function printing out quot;Nonequot;?(为什么我的函数输出打印出“无?)
                  <tfoot id='dII9Y'></tfoot>
                  • <bdo id='dII9Y'></bdo><ul id='dII9Y'></ul>

                        <tbody id='dII9Y'></tbody>

                        <small id='dII9Y'></small><noframes id='dII9Y'>

                          <legend id='dII9Y'><style id='dII9Y'><dir id='dII9Y'><q id='dII9Y'></q></dir></style></legend>
                          • <i id='dII9Y'><tr id='dII9Y'><dt id='dII9Y'><q id='dII9Y'><span id='dII9Y'><b id='dII9Y'><form id='dII9Y'><ins id='dII9Y'></ins><ul id='dII9Y'></ul><sub id='dII9Y'></sub></form><legend id='dII9Y'></legend><bdo id='dII9Y'><pre id='dII9Y'><center id='dII9Y'></center></pre></bdo></b><th id='dII9Y'></th></span></q></dt></tr></i><div id='dII9Y'><tfoot id='dII9Y'></tfoot><dl id='dII9Y'><fieldset id='dII9Y'></fieldset></dl></div>