MAC OS使用技巧23-设置Python默认版本

如下步骤是在MAC OS X中设置默认终端使用的Python版本的方式。这里以设置Python3版本为例。

检查Python3的文件位置

which python3
MAC OS使用技巧23-设置Python默认版本

在bash_profile中写位置别名

vi ~/.bash_profile
MAC OS使用技巧23-设置Python默认版本

重新加载bash_profile

source ~/.bash_profile

验证是否生效

python --version
发表评论
留言与评论(共有 0 条评论) “”
   
验证码:

相关文章

推荐文章