macOS下安装Python多版本

Lucilfer2019-01-18 10:24:17

安装

macOS自带Python是2.x,需要我们安装比较新的版本(Python3.7.2)。

下载地址:https://www.python.org/downloads/release/python-372/

配置

$ vim ~/.bashrc
# 增加alias python37='/usr/local/bin/python3.7'
$ source ~/.baserc

使用

$ python37
Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
0 回复 | 截止 2019-05-25 23:07:14
Top ↑