macOS

来源:互联网 发布:三菱plc控制软件 编辑:程序博客网 时间:2024/05/22 12:46

其实就一行代码

macOS 自带 python解释器,这里就不多说了,可以通过下面命令进行测试:

$ python --versionPython 2.7.10

安装 python3

没有 安装 homebrew 先安装 homebrew

// 安装在 /usr/local/Cellar/python3$ brew install python3

使用 python3

$ python3 test.py

升级与安装 python2

$ brew install python

使用 python2

$ python test.py
0 0
原创粉丝点击