error: Command "/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_c1y70ct529/croot/python-split_1665695297547/_build_env/bin/llvm-ar rcs build/temp.macosx-11.1-arm64-3.9/libnpymath.a build/temp.macosx-11.1-arm64-3.9/numpy/core/src/npymath/npy_math.o build/temp.macosx-11.1-arm64-3.9/build/src.macosx-11.1-arm64-3.9/numpy/core/src/npymath/ieee754.o build/temp.macosx-11.1-arm64-3.9/build/src.macosx-11.1-arm64-3.9/numpy/core/src/npymath/npy_math_complex.o build/temp.macosx-11.1-arm64-3.9/numpy/core/src/npymath/halffloat.o" failed with exit status 127
########### CLIB COMPILER OPTIMIZATION ###########
Platform :
Architecture: aarch64
Compiler : clang
CPU baseline :
Requested : 'min'
Enabled : NEON NEON_FP16 NEON_VFPV4 ASIMD
Flags : none
Extra checks: none
CPU dispatch :
Requested : 'max -xop -fma4'
Enabled : ASIMDHP ASIMDDP
Generated : none
CCompilerOpt._cache_write[796] : write cache to path -> /private/var/folders/b3/rwgrld754t17vktnzkrg86dw0000gn/T/pip-install-ilxhsy68/numpy_3cd0c7164f0c4bce8ed72e668f202073/build/temp.macosx-11.1-arm64-3.9/ccompiler_opt_cache_clib.py
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
[end of output]
python版本降低一下,改用3.7的试试
-Ibuild/src.macosx-11.1-arm64-3.9/numpy/core/src/common -Ibuild/src.macosx-11.1-arm64-3.9/numpy/core/src/npymath -c'
extra options: '-march=native'
应该是编译c++时报错:
clang: error: the clang compiler does not support '-march=native'
解决办法:
将-march=native改为-mcpu=apple-m1 可是我不知道改那个文件里面的指令。