zsh终端中执行python3或pip3命令,弹出Install Command Line Developer Tools弹窗安装

OS:macOS15.5 CPU:Apple M1 Pro

zsh终端中执行python或pip命令,提示未找到命令,但执行python3或pip3命令,预期也是提示未找到命令,实际结果弹出Install Command Line Developer Tools弹窗安装,网上查阅资料,删除/usr/bin/python3、/usr/bin/pip3、/usr/local/bin/python3、/usr/local/bin/pip3文件即可达到预期,但无权限删除/usr/bin/python3与/usr/bin/pip3文件,尝试过root账号、进行系统恢复模式暂时禁用SIP解决方案,都无法解决;🙏大佬指点一二;

Answered by DTS Engineer in 846701022

Sadly, I can’t read Chinese, so I’m responding based on a machine translation of your question.

macOS does not come with a built-in copy of Python [1]. Given that, we recommend that you install Python either from its website or using a package manager like Homebrew.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] There are a couple of complicating factors here:

  • Historically macOS did ship with Python.

  • Apple’s developer tools include a copy of Python, but that copy is an implementation detail and isn’t really targeted at Python developers.

Sadly, I can’t read Chinese, so I’m responding based on a machine translation of your question.

macOS does not come with a built-in copy of Python [1]. Given that, we recommend that you install Python either from its website or using a package manager like Homebrew.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] There are a couple of complicating factors here:

  • Historically macOS did ship with Python.

  • Apple’s developer tools include a copy of Python, but that copy is an implementation detail and isn’t really targeted at Python developers.

zsh终端中执行python3或pip3命令,弹出Install Command Line Developer Tools弹窗安装
 
 
Q