我的Mac默认安装了Python2.7,但我想使用Python3.6.1.
如何更改终端(Mac OS)中使用的Python版本?
请解释清楚,offer no third party version manager suggestions.
我的Mac默认安装了Python2.7,但我想使用Python3.6.1.
如何更改终端(Mac OS)中使用的Python版本?
请解释清楚,offer no third party version manager suggestions.
最简单的方法是将别名添加到python3
,以始终指向安装的本机python
.最后,将这一行添加到$HOME
目录中的.bash_profile
文件中,
alias python="python3"
这样做会使更改反映在打开的每个交互式shell上.