讨论数量:
pygame 不用下载, 直接安装就可以了, 把你安装的那个目录删除
pip install pygame
安装完成
确认安装结果
d:\>python
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
pygame 2.0.0 (SDL 2.0.12, python 3.6.2)
Hello from the pygame community. https://www.pygame.org/contribute.html
或 Visual Studio Code 建立档案
# new.py
import pygame
執行 Ctrl-F5
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS D:\Python\cpython-3.8.0b4\.azure-pipelines> & 'python' 'c:\Users\Jason\.vscode\extensions\ms-python.python-2020.11.371526539\pythonFiles\lib\python\debugpy\launcher' '65291' '--' 'd:\Python\cpython-3.8.0b4\.azure-pipelines\new.py'
pygame 2.0.0 (SDL 2.0.12, python 3.6.2)
Hello from the pygame community. https://www.pygame.org/contribute.html
PS D:\Python\cpython-3.8.0b4\.azure-pipelines>
pygame 不用下载, 直接安装就可以了, 把你安装的那个目录删除
安装完成
确认安装结果
或 Visual Studio Code 建立档案
執行 Ctrl-F5