简体   繁体   English

Xcode swift iOS 尝试构建项目时出现“usr/bin/python 没有这样的文件或目录”错误

[英]Xcode swift iOS project gives "usr/bin/python no such file or directory" error when try to build project

I am experiencing the problem after the macOS 12.3 Monterey update.我在 macOS 12.3 Monterey 更新后遇到了这个问题。 I get the following error when I want to run the project.当我想运行项目时出现以下错误。 There is a code looking for "/usr/bin/python" in the project, but I couldn't find which part of code/framework/script etc. is looking for that path in my project.有一个代码在项目中寻找“/usr/bin/python” ,但我找不到代码/框架/脚本等的哪一部分在我的项目中寻找那个路径。 There is no problem in the path "usr/local/bin/python", but my project gives the error that I cannot find the path to "usr/bin/python". “usr/local/bin/python”路径没有问题,但是我的项目报错找不到“usr/bin/python”路径。 When I looked there, "/usr/bin/python3" exist.当我看那里时, “/usr/bin/python3”存在。 Unfortunately, since it is the system folder, I cannot make any changes(add or remove files or links) in that folder.不幸的是,因为它是系统文件夹,所以我无法在该文件夹中进行任何更改(添加或删除文件或链接)。 在此处输入图像描述

First you need to install python2.首先你需要安装python2。 This can be done according to the guide这可以根据指南完成

Then it is necessary in the file然后在文件中是必要的

{PATH_TO_PROJECT}/scripts/licenses/importLicensePods.py

replace the first line with #!/usr/bin/python to #!/usr/bin/local/python将第一行#!/usr/bin/python替换为#!/usr/bin/local/python

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 运行时错误:$ virtualenv --python = / usr / bin / python2.7 <path/to/new/project/> name_project - Error when run: $ virtualenv --python=/usr/bin/python2.7 <path/to/new/project/> name_project / usr / bin / env:python2.6:没有这样的文件或目录错误 - /usr/bin/env: python2.6: No such file or directory error 获取usr / bin / python2.7:那里没有这样的文件或目录 - Getting usr/bin/python2.7: No such file or directory when it's there 调度python脚本时出错:fcron [12036]:无法执行&#39;/ usr / bin / sendmail&#39;:没有这样的文件或目录 - Error when scheduling python script: fcron[12036]: Couldn't exec '/usr/bin/sendmail': No such file or directory 错误的解释器没有这样的文件或目录 /usr/bin/python - bad interpreter no such file or directory /usr/bin/python /usr/bin/env: python,没有那个文件或目录 - /usr/bin/env: python, No such file or directory hadoop /usr/bin/env: python: 没有那个文件或目录 - hadoop /usr/bin/env: python: No such file or directory WSL: /usr/bin/env: 'python': 没有那个文件或目录 - WSL: /usr/bin/env: ‘python’: No such file or directory ubuntu /usr/bin/env: python: 没有那个文件或目录 - ubuntu /usr/bin/env: python: No such file or directory @!/usr/bin/env: 当我尝试使用 ros 节点时没有这样的文件或目录 - @!/usr/bin/env: No such file or directory when i try to use ros nodes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM