mac 同时安装python2 python3

1.首先mac会自带Python的,版本应该都是Python2的,但是这个最好不要乱动,我们可以自己下载一个Python2

2.打开终端,输入:brew install python ,Python2安装成功啦,可以用命令查看:Python --version

3.打开终端,输入:brew install python3 ,Python3安装成功啦,可以用命令查看:Python3 --version

4.路径都会有保存在/usr/local/Cellar/,所以在终端可以直接使用命令打开文件:open /usr/local/Cellar/,就会看到pyhon和Python3两个文件夹

详细解决方案见知乎:https://zhuanlan.zhihu.com/p/29677452

你可能感兴趣的:(mac 同时安装python2 python3)