在MacBook下用pip 安装pygame报错

**

在MacBook下用pip 安装pygame报错*

macOS系统为10.15.6
电脑中有python2 和python3版本的
要安装在python3下
安装命令原本是:python3 -m pip install xxxxxx
查询python3下三方库如下: python3 -m pip list
国内源pip install pygame -i https://mirrors.aliyun.com/pypi/simple/
但是安装之后提示错误信息,一直在报错
在这里插入图片描述

错误命令:pip3 install pygame总是错误Failed building wheel for pygame


重点重点


安装成功执行的命令python3 -m pip install -U pygame==2.0.0.dev6 --user

( 尝试一次之后就成功了
不过安装时间有点久,具体看网速)
用终端查看pip3 list
测试命令python3 -m pygame.examples.aliens
在这里插入图片描述

安装成功信息提示

danshuangdeMacBook-Pro:~ shanshuang$ python3 -m pip install -U pygame==2.0.0.dev6 --user
Collecting pygame==2.0.0.dev6
  Downloading pygame-2.0.0.dev6-cp38-cp38-macosx_10_11_intel.whl (5.5 MB)
     |████████████████████████████████| 5.5 MB 44 kB/s 
Installing collected packages: pygame
Successfully installed pygame-2.0.0.dev6
danshuangdeMacBook-Pro:~ shanshuang$ pip3 list
Package               Version
--------------------- ----------
cycler                0.10.0
decorator             4.4.2
imageio               2.9.0
kiwisolver            1.2.0
matplotlib            3.3.0
networkx              2.4
numpy                 1.19.0
opencv-contrib-python 4.3.0.36
Pillow                7.2.0
pip                   20.2.1
pygame                2.0.0.dev6
pyparsing             2.4.7
python-dateutil       2.8.1
PyWavelets            1.1.1
scikit-image          0.17.2
scipy                 1.5.1
setuptools            41.2.0
six                   1.15.0
tifffile              2020.7.17
wheel                 0.34.2
danshuangdeMacBook-Pro:~ shanshuang$ python3 -m pygame.examples.aliens

pygame 2.0.0.dev6 (SDL 2.0.10, python 3.8.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
danshuangdeMacBook-Pro:~ shanshuang$ 
danshuangdeMacBook-Pro:~ shanshuang$ python3 -m pygame.examples.aliens
pygame 2.0.0.dev6 (SDL 2.0.10, python 3.8.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
danshuangdeMacBook-Pro:~ shanshuang$  python3 -m pygame.examples.aliens
pygame 2.0.0.dev6 (SDL 2.0.10, python 3.8.3)
Hello from the pygame community. https://www.pygame.org/contribute.html

测试成功画面:在这里插入图片描述

©️2020 CSDN 皮肤主题: 数字20 设计师:CSDN官方博客 返回首页