前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Mac同时安装python2和pytho

Mac同时安装python2和pytho

作者头像
py3study
发布2020-01-03 10:36:43
8090
发布2020-01-03 10:36:43
举报
文章被收录于专栏:python3python3

Mac同时安装python2和python3

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

安装套件管理工具homebrew:

localhost:~ mac$ ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"

安装后检查一下(我的虽然安装后出现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

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019-09-28 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档