同时安装python2.7和3_Mac同时安装python2和python3

Mac同时安装python2和python3

Mac自带的python版本2.7,而2.7的版本默认的字符集是ascii,不支持中文,3的版本默认是utf-8,在使用中会方便很多

安装套件管理工具homebrew:

安装后检查一下(我的虽然安装后出现waring提示,但是不影响python3的安装的):

localhost:~ mac$ brew doctor

Please note that these warnings are just used to help the Homebrew maintainers

with debugging if you file an issue. If everything you use Homebrew for is

working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: A newer Command Line Tools release is available.

Update them from Software Update in the App Store.

Warning: Broken symlinks were found. Remove them with `brew prune`:

/usr/local/share/man/man8/prlexec.8

安装python3:

localhost:~ mac$ brew install python3

检查python版本:

localhost:~ mac$ python3 –v

Python 3.7.0 (default, Oct 2 2018, 09:20:07)

检查连个python位置:

localhost:python mac$ which python

/usr/bin/python

localhost:python mac$ which python3

/usr/local/bin/python3

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值