【Macos中路径usr/bin/python3的默认Python】

 

初次上手macOS,准备配置一下python编程环境方便写代码。我没有任何macOS的使用经验,按照习惯我想找一个cmd之类的界面试试简单的输入输出。

我首先查找macOS的终端,输入python3,发现系统让我安装苹果的开发者命令行工具,这套工具自带的版本是python3.8.9。

我一想也可以,用系统的python可以省一点心。然而我又安装python.org官网的最新官方包,版本是3.10.6。

之后打开vscode就发现有两个python了,如上图所示。我想能不能不要多出一个python来显得很冗余。

于是我上网查了许多资料。包括苹果开发者论坛、python官方论坛、知乎高赞回答等。

最后的结论是最好保留system install的python3.8.9,平时就用自己从第三方安装并维护的另一些版本的python。

参考:

Updating Python under /usr/bin/python3 

https://discuss.python.org/t/updating-python-under-usr-bin-python3/13020

Is /usr/bin/python3 provided with macOS catalina? 

https://apple.stackexchange.com/questions/376077/is-usr-bin-python3-provided-with-macos-catalina

Having multiple python3 directories after single installation? 

https://developer.apple.com/forums/thread/680222

为什么 macOS 在 /usr/bin/ 下会有 python3? - 冯柒柒的回答 - 知乎

https://www.zhihu.com/question/420273182/answer/169984080

posted @ 2022-09-06 22:48  wjybq  阅读(718)  评论(0)    收藏  举报