Pygame下载好了,但不知道怎么用pip安装,求大佬教


目前文件文件放在了这个目录下,不知道怎么下一步,百度的教程太花哨了,不知道怎么用

Jason990420
最佳答案

pygame 不用下载, 直接安装就可以了, 把你安装的那个目录删除

pip install pygame

安装完成

file

确认安装结果

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> 
2个月前 评论
honour (楼主) 2个月前
讨论数量: 2
Jason990420

pygame 不用下载, 直接安装就可以了, 把你安装的那个目录删除

pip install pygame

安装完成

file

确认安装结果

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> 
2个月前 评论
honour (楼主) 2个月前

python第三方库的安装统一使用pip install xxx的方式就好了。。。

2个月前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!