Mac 安装Python3

 

 

默认Mac电脑上安装的Python版本是2.X,众所周知Python3.X和Python2.X互不兼容。默认Mac系统已经安装Python2.7,如果使用Python3.x需要手动安装

一、查看默认版本

localhost:~ sun$ python
Python 2.7.10 (default, Jul 15 2017, 17:16:57)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

二、安装Python3.x

1.登录Python官网

www.python.org

2.选择下载Python3.x

3.安装Python3.x,Python3.x下载完后为.pkg文件,安装方法和安装其他应用软件一样。

 

三、查看安装后版本localhost:~ sun$ python3

localhost:~ sun$ python3
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

 

讨论区

暂无评论

发表评论

[annotate]术语||注释[/annotate]悬停术语注释
[blur]模糊文本[/blur]高斯模糊
[black]黑幕文本[/black]黑幕遮挡
[img]图片地址[/img]内嵌图片
[b]粗体[/b] [i]斜体[/i] [s]删除线[/s] [u]下划线[/u]文字样式
[url=链接地址]文字[/url]超链接
[quote]引用内容[/quote]引用块
[h1]~[h5]标题[/h1]~[/h5]多级标题
版权说明
许可协议:CC BY-SA 4.0
原文链接:https://www.xiaobei.one/archives/399.html