[英]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.