小白在mac中的Python2.7及Python3.6中安装Pygame

问题描述:在mac中安装了两个版本的Python,终端默认Python2.7, launchpad中可以找到Python3.6.应用程序中存在Python2.7和Python3.6的文件夹

解决:首先安装pip,安装过程中感觉系统自带Python中存有pip,可能也不需要安装。如需安装,可在“https://pip.pypa.io/en/stable/installing/”中另存“get-pip.py”为get-pip.py文件,进入python运行安装。

而后,进入mac“终端”,直接输入“sudo pip install pygame”,进入Python2.7的Pygame安装模式。“sudo pip3 install pygame”则进入Python3.6的Pygame安装模式。

安装完毕,可分别进入相关Python检测安装状态。输入“import pygame”,出现“>>>”则成功安装!

祝您顺利!

猜你喜欢

转载自blog.csdn.net/YS_Zhang/article/details/66107919