【问题标题】:mac os12.4 python: error: Failed to locate 'python'mac os12.4 python:错误:无法找到“python”
【发布时间】:2022-06-16 11:19:20
【问题描述】:

当我键入 cd ./

时出现此错误
python: error: Failed to locate 'python'. 
xcode-select: Failed to locate 'python', requesting installation of command line developer tools.

【问题讨论】:

  • macos uses which using which python 应该会告诉你是否已安装

标签: python macos


【解决方案1】:

https://docs.nativescript.org/environment-setup.html#macos-ios

mac 现在默认不安装 python。 所以我需要安装python并链接到它。

sudo ln -s $(which python3) /usr/local/bin/python 

在我的情况下效果很好

【讨论】:

  • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
【解决方案2】:
sudo ln -s $(which python3) /Applications/Xcode.app/Contents/Developer/usr/bin/python

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-26
    • 2016-04-04
    • 2017-12-25
    • 2019-05-11
    • 1970-01-01
    • 2021-05-14
    • 1970-01-01
    相关资源
    最近更新 更多