为什么我在“pip install ephem”中出现此错误?

为什么我在“pip install ephem”中出现此错误?
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

error: command '/usr/bin/clang' failed with exit status 1

----------------------------------------
Cleaning up...
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/var/folders/12/knn7d9c16gd1f0jkjr740q100000gn/T/pip_build_Philip/ephem/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/12/knn7d9c16gd1f0jkjr740q100000gn/T/pip-2XJEpS-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/12/knn7d9c16gd1f0jkjr740q100000gn/T/pip_build_Philip/ephem
Storing debug log for failure in /Users/Philip/.pip/pip.log

在安装消息的末尾,它给出了这些错误。我的某个本应在此处的目录是否丢失了?我该如何修复此问题?

答案1

看起来你缺少 xcrun,请尝试以下xcode-select --install

相关内容