问题
error: Command "gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/mengyun/anaconda3/include -arch x86_64 -I/Users/mengyun/anaconda3/include -arch x86_64 -I/var/folders/26/yfdf2b253gl9jfhjf8dd7clm0000gn/T/tmp35hyti75/src.macosx-10.7-x86_64-3.6 -I/Users/mengyun/anaconda3/lib/python3.6/site-packages/numpy/core/include -I/Users/mengyun/anaconda3/include/python3.6m -c /var/folders/26/yfdf2b253gl9jfhjf8dd7clm0000gn/T/tmp35hyti75/src.macosx-10.7-x86_64-3.6/cteqmodule.c -o /var/folders/26/yfdf2b253gl9jfhjf8dd7clm0000gn/T/tmp35hyti75/var/folders/26/yfdf2b253gl9jfhjf8dd7clm0000gn/T/tmp35hyti75/src.macosx-10.7-x86_64-3.6/cteqmodule.o -MMD -MF /var/folders/26/yfdf2b253gl9jfhjf8dd7clm0000gn/T/tmp35hyti75/var/folders/26/yfdf2b253gl9jfhjf8dd7clm0000gn/T/tmp35hyti75/src.macosx-10.7-x86_64-3.6/cteqmodule.o.d" failed with exit status 1
解决办法
python3 ~/path/to/numpy/f2py -m cteq cteq.f -h cteq.pyf
cp cteq.pyf cteq-orig.pyf
diff cteq.pyf cteq-orig.pyf
python3 ~/path/to/numpy/f2py -c cteq.pyf cteq.f