我正在进行一个需要使用Python 3.7的项目。我尝试通过运行以下命令来解决我的setup.py
和requirements.txt
之间的不匹配:
pip-compile --output-file=requirements.txt setup.py
但我遇到了这个错误
compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/private -Inumpy/core/include -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/me/.pyenv/versions/3.7.13/envs/queue-volume-drivers-3.7.13/include -I/Users/me/.pyenv/versions/3.7.13/include/python3.7m -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/private -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/npymath -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/private -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/npymath -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/private -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/npymath -c'
extra options: '-faltivec -I/System/Library/Frameworks/vecLib.framework/Headers'
clang: numpy/core/src/multiarray/alloc.c
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/opt/homebrew/opt/openssl@3/include -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/private -Inumpy/core/include -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/me/.pyenv/versions/3.7.13/envs/queue-volume-drivers-3.7.13/include -I/Users/me/.pyenv/versions/3.7.13/include/python3.7m -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/private -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/npymath -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/private -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/npymath -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/private -Ibuild/src.macosx-12.6-arm64-3.7/numpy/core/src/npymath -c numpy/core/src/multiarray/alloc.c -o build/temp.macosx-12.6-arm64-3.7/numpy/core/src/multiarray/alloc.o -MMD -MF build/temp.macosx-12.6-arm64-3.7/numpy/core/src/multiarray/alloc.o.d -faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> numpy