在mac系统升级后,重新安装xcode后,原来的命令行工具被卸载,导致源代码安装或者pip,brew等安装工具无法正常工作(因为会调用xcrun)
- 命令行工具导致的问题
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c talib/_ta_lib.c -o build/temp.macosx-10.9-x86_64-3.6/talib/_ta_lib.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command 'gcc' failed with exit status 1
- 命令行工具安装
xcode-select --install
-
安装命令行工具的提示
-
安装完毕继续使用pip安装ta-lib