1、安装pip3:
sudo apt-get install python3-pip
问题:ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
使用2点解决,主要就是设置了timoout的时间
2、我是使用这个成功安装pygame:sudo pip3 --default-timeout=10000 install -U pygame
安装pygame之前需要安装pip3,否则会报错找不到pip3命令
3、验证是否安装成功:sudo python3 -m pygame.examples.aliens
安装成功使用该命令会有一个飞机大战坦克的游戏