Mac 终端
使用以下命令:
python3 -m pip install -U pygame --user
如果太慢,可以使用镜像服务器(以下命令在同一行):
python3 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn -U pygame --user
安装完成后运行以下命令,查看是否安装成功:
python3 -m pygame.examples.aliens
镜像服务器:
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
pip升级
pip install --upgrade pip
pip常用命令
pip --version
# 显示版本和路径
pip --help
#获取帮助
pip install -U pip