我是 Python 的新手,我正拼命尝试通过 spyder 安装 PyObjC。 命令
pip install PyObjC
返回错误:
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/0v/cg_rdz_x4d32jm6hz7n5txgh3djxb1/T/pip-build-UBlDtP/pyobjc-core/
在其他帖子中找不到有效的解决方案。我还尝试通过 conda 手动安装整个东西。 似乎已经安装了 Xcode。 这是我遇到问题的唯一模块。
有什么建议吗? :)
注意:我在 macOS Sierra 10.12 上使用 Python 2.7
最佳答案
实际的错误消息可以提供更多帮助,在回溯的开头。在我的例子中是
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Traceback (most recent call last):
File "<string>", line 1, in <module>
...
如果您遇到同样的情况,以下是有关如何调试它的答案: xcode-select active developer directory error
关于python - 安装 PyObjC osX 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39894476/