python - 如何避免make命令触发Xcode
问题描述
我有一个 python 项目,makefile
其中有
test: clean lint
@pytest app/tests/ --cov ./app -s
我通常make test
在终端中输入来触发它pytest
。但是,最近它停止了工作。相反,我得到一个错误
make: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk '' -find make 2> /dev/null' failed with exit code 256: (null) (errno=No such file or directory)
MacOS 会弹出一个消息窗口,说它需要下载软件(除了进度条之外没有其他详细信息)。完成安装大约需要 10 分钟。但这并没有改变任何东西。虽然我从未使用过 XCode,但我已经安装了它。Pytest
如果我直接输入 pytest 命令仍然有效。
我的机器是带有 BigSur Intel CPU 的 Macbook Pro。我不是 iOS/MacOS 应用程序开发人员,也不使用 Xcode。我不明白为什么会make
触发它。如何避免?
遵循@MadScientist 建议的更多信息:
> type -a make
make is /usr/bin/make
> make --version
OR
> make -d test
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun
> /usr/bin/make
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun
解决方案
推荐阅读
- angular - 我们如何在 keydown 事件中识别角色的位置?
- css - CSS 网格重复网格布局
- java - 无法从 Observable 注销
- python - Python 错误 - 如何检查中间件是否在您的 PYTHONPATH 中以及如何将其添加到路径中?
- r - ISO 8061 dmy 在更改日期的某一行后无法解析
- asp.net-mvc - 如何在 ASP.NET API 中实现 PayEx 支付网关?
- python - 对无关窗口的奇怪 sdl 副作用
- php - 是否有任何可能的方法仅将 firebase 数据库用于实时消息传递并将数据存储在自己的服务器上
- xodus - 如何使用 Xodux-DNQ 更新实体
- arrays - 在使用 API 和 ANGULAR 7 选择对象时,我们如何将对象从一个数组移动到另一个数组?