pip安装numpy时出现约900行错误消息

kx1ctssn  于 2023-08-05  发布在  其他
关注(0)|答案(1)|浏览(84)

我使用的是MacOS Ventura 13.4.1(Apple M1芯片)。以下是关于我的本地设置的一些信息:

> uname -m
arm64
> pyenv -v
pyenv 2.3.22
> pyenv versions
  system
* 3.6.15 (set by /Users/user1/.pyenv/version)
  3.7.17
> python -V
Python 3.6.15
> pip -V
pip 21.3.1 from /Users/user1/.pyenv/versions/3.6.15/lib/python3.6/site-packages/pip (python 3.6)

字符串
我可以很好地运行Python文件。但是当我执行pip install numpy时,我得到下面的~900行错误消息(中间被截断)。我也试过--no-cache-dir。其他pip安装成功,例如pytest.我在这里确实需要使用Python 3.6,我知道这是一个较旧的版本。

(conda_env) user1@xxx directory % pip install numpy --no-cache-dir
Collecting numpy
  Downloading numpy-1.19.5.zip (7.3 MB)
     |████████████████████████████████| 7.3 MB 4.4 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: numpy
  Building wheel for numpy (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/user1/.pyenv/versions/3.6.15/bin/python3.6 /Users/user1/.pyenv/versions/3.6.15/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/sm/906grd657hd0rc9std54b39w0000gn/T/tmp10f0xbak
       cwd: /private/var/folders/sm/906grd657hd0rc9std54b39w0000gn/T/pip-install-2mc8sdc8/numpy_e35df2512ab24c5382ec786ebe6e6e01
  Complete output (901 lines):
  numpy/random/_bounded_integers.pxd.in has not changed
  numpy/random/_philox.pyx has not changed
  numpy/random/_bounded_integers.pyx.in has not changed
  numpy/random/_sfc64.pyx has not changed
  numpy/random/_mt19937.pyx has not changed
  numpy/random/bit_generator.pyx has not changed
  Processing numpy/random/_bounded_integers.pyx
  numpy/random/mtrand.pyx has not changed
  numpy/random/_generator.pyx has not changed
  numpy/random/_pcg64.pyx has not changed
  numpy/random/_common.pyx has not changed
  Cythonizing sources
  blas_opt_info:
  blas_mkl_info:
  customize UnixCCompiler
    libraries mkl_rt not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
    NOT AVAILABLE

  blis_info:
    libraries blis not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
    NOT AVAILABLE

  openblas_info:
    libraries openblas not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
    NOT AVAILABLE

  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
    libraries tatlas not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
    NOT AVAILABLE

  atlas_3_10_blas_info:
    libraries satlas not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
    NOT AVAILABLE

  atlas_blas_threads_info:
  Setting PTATLAS=ATLAS
    libraries ptf77blas,ptcblas,atlas not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
    NOT AVAILABLE

  atlas_blas_info:
    libraries f77blas,cblas,atlas not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
    NOT AVAILABLE

  accelerate_info:
    libraries accelerate not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
  Library accelerate was not found. Ignoring
    libraries veclib not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
  Library veclib was not found. Ignoring
    FOUND:
      extra_compile_args = ['-faltivec', '-I/System/Library/Frameworks/vecLib.framework/Headers']
      extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
      define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]

    FOUND:
      extra_compile_args = ['-faltivec', '-I/System/Library/Frameworks/vecLib.framework/Headers']
      extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
      define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]

  non-existing path in 'numpy/distutils': 'site.cfg'
  lapack_opt_info:
  lapack_mkl_info:
    libraries mkl_rt not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
    NOT AVAILABLE

  openblas_lapack_info:
    libraries openblas not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
    NOT AVAILABLE

  openblas_clapack_info:
    libraries openblas,lapack not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
    NOT AVAILABLE

  flame_info:
    libraries flame not found in ['/Users/user1/.pyenv/versions/3.6.15/lib', '/usr/local/lib', '/usr/lib', '/opt/local/lib']
    NOT AVAILABLE

  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
    libraries lapack_atlas not found in /Users/user1/.pyenv/versions/3.6.15/lib
    libraries tatlas,tatlas not found in /Users/user1/.pyenv/versions/3.6.15/lib
    libraries lapack_atlas not found in /usr/local/lib
    libraries tatlas,tatlas not found in /usr/local/lib
    libraries lapack_atlas not found in /usr/lib
    libraries tatlas,tatlas not found in /usr/lib
    libraries lapack_atlas not found in /opt/local/lib
    libraries tatlas,tatlas not found in /opt/local/lib
  <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
    NOT AVAILABLE

  atlas_3_10_info:
    libraries lapack_atlas not found in /Users/user1/.pyenv/versions/3.6.15/lib
    libraries satlas,satlas not found in /Users/user1/.pyenv/versions/3.6.15/lib
    libraries lapack_atlas not found in /usr/local/lib
    libraries satlas,satlas not found in /usr/local/lib
    libraries lapack_atlas not found in /usr/lib
    libraries satlas,satlas not found in /usr/lib
    libraries lapack_atlas not found in /opt/local/lib
    libraries satlas,satlas not found in /opt/local/lib
  <class 'numpy.distutils.system_info.atlas_3_10_info'>
    NOT AVAILABLE

  atlas_threads_info:
  Setting PTATLAS=ATLAS
    libraries lapack_atlas not found in /Users/user1/.pyenv/versions/3.6.15/lib
    libraries ptf77blas,ptcblas,atlas not found in /Users/user1/.pyenv/versions/3.6.15/lib
    libraries lapack_atlas not found in /usr/local/lib
    libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
    libraries lapack_atlas not found in /usr/lib
    libraries ptf77blas,ptcblas,atlas not found in /usr/lib
    libraries lapack_atlas not found in /opt/local/lib
    libraries ptf77blas,ptcblas,atlas not found in /opt/local/lib
  <class 'numpy.distutils.system_info.atlas_threads_info'>
    NOT AVAILABLE

  atlas_info:
    libraries lapack_atlas not found in /Users/user1/.pyenv/versions/3.6.15/lib
    libraries f77blas,cblas,atlas not found in /Users/user1/.pyenv/versions/3.6.15/lib
    libraries lapack_atlas not found in /usr/local/lib
    libraries f77blas,cblas,atlas not found in /usr/local/lib
    libraries lapack_atlas not found in /usr/lib
    libraries f77blas,cblas,atlas not found in /usr/lib
    libraries lapack_atlas not found in /opt/local/lib
    libraries f77blas,cblas,atlas not found in /opt/local/lib
  <class 'numpy.distutils.system_info.atlas_info'>
    NOT AVAILABLE

    FOUND:
      extra_compile_args = ['-faltivec', '-I/System/Library/Frameworks/vecLib.framework/Headers']
      extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
      define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None)]

  running bdist_wheel
  running build
  running config_cc
  unifing config_cc, config, build_clib, build_ext, build commands --compiler options
  running config_fc
  unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
  running build_src
  build_src
  building py_modules sources
  building library "npymath" sources
  Could not locate executable gfortran
  Could not locate executable f95
  Could not locate executable f90
  Could not locate executable f77
  Could not locate executable xlf90
  Could not locate executable xlf
  Could not locate executable ifort
  Could not locate executable ifc
  Could not locate executable g77
  Could not locate executable g95
  Could not locate executable pgfortran
  don't know how to compile Fortran code on platform 'posix'
    adding 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/npymath' to include_dirs.
  None - nothing done with h_files = ['build/src.macosx-13.4-arm64-3.6/numpy/core/src/npymath/npy_math_internal.h']
  building library "npysort" sources
    adding 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/common' to include_dirs.
  None - nothing done with h_files = ['build/src.macosx-13.4-arm64-3.6/numpy/core/src/common/npy_sort.h', 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/common/npy_partition.h', 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/common/npy_binsearch.h']
  building library "npyrandom" sources
  building extension "numpy.core._multiarray_tests" sources
  building extension "numpy.core._multiarray_umath" sources
    adding 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/umath' to include_dirs.
    adding 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/npymath' to include_dirs.
    adding 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/common' to include_dirs.
  numpy.core - nothing done with h_files = ['build/src.macosx-13.4-arm64-3.6/numpy/core/src/umath/funcs.inc', 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/umath/simd.inc', 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/umath/loops.h', 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/umath/matmul.h', 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/umath/clip.h', 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/npymath/npy_math_internal.h', 'build/src.macosx-13.4-arm64-3.6/numpy/core/src/common/templ_common.h', 'build/src.macosx-13.4-arm64-3.6/numpy/core/include/numpy/config.h', 'build/src.macosx-13.4-arm64-3.6/numpy/core/include/numpy/_numpyconfig.h', 'build/src.macosx-13.4-arm64-3.6/numpy/core/include/numpy/__multiarray_api.h', 'build/src.macosx-13.4-arm64-3.6/numpy/core/include/numpy/__ufunc_api.h']
  building extension "numpy.core._umath_tests" sources
  building extension "numpy.core._rational_tests" sources
  building extension "numpy.core._struct_ufunc_tests" sources
  building extension "numpy.core._operand_flag_tests" sources
  building extension "numpy.fft._pocketfft_internal" sources
  building extension "numpy.linalg.lapack_lite" sources
  building extension "numpy.linalg._umath_linalg" sources
  building extension "numpy.random._mt19937" sources
  building extension "numpy.random._philox" sources
  building extension "numpy.random._pcg64" sources
  building extension "numpy.random._sfc64" sources
  building extension "numpy.random._common" sources
  building extension "numpy.random.bit_generator" sources
  building extension "numpy.random._generator" sources
  building extension "numpy.random._bounded_integers" sources
  building extension "numpy.random.mtrand" sources
  building data_files sources
  build_src: building npy-pkg config files
  running build_py

  (Removed chunk of error message)
  
  numpy/core/src/npysort/selection.c.src:326:14: note: silence by adding parentheses to mark code as explicitly dead
      else if (0 && kth == num - 1) {
               ^
               /* DISABLES CODE */ ( )
  numpy/core/src/npysort/selection.c.src:328:9: warning: code will never be executed [-Wunreachable-code]
          npy_intp k;
          ^~~~~~~~~~~
  numpy/core/src/npysort/selection.c.src:326:14: note: silence by adding parentheses to mark code as explicitly dead
      else if (0 && kth == num - 1) {
               ^
               /* DISABLES CODE */ ( )
  numpy/core/src/npysort/selection.c.src:328:9: warning: code will never be executed [-Wunreachable-code]
          npy_intp k;
          ^~~~~~~~~~~
  numpy/core/src/npysort/selection.c.src:326:14: note: silence by adding parentheses to mark code as explicitly dead
      else if (0 && kth == num - 1) {
               ^
               /* DISABLES CODE */ ( )
  22 warnings generated.
  ar: adding 7 object files to build/temp.macosx-13.4-arm64-3.6/libnpysort.a
  ranlib:@ build/temp.macosx-13.4-arm64-3.6/libnpysort.a
  building 'npyrandom' library
  compiling C sources
  C compiler: 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

  creating build/temp.macosx-13.4-arm64-3.6/numpy/random
  creating build/temp.macosx-13.4-arm64-3.6/numpy/random/src
  creating build/temp.macosx-13.4-arm64-3.6/numpy/random/src/distributions
  compile options: '-Inumpy/core/include -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/user1/.pyenv/versions/3.6.15/include/python3.6m -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/common -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/npymath -c'
  clang: numpy/random/src/distributions/logfactorial.c
  clang: numpy/random/src/distributions/distributions.c
  clang: numpy/random/src/distributions/random_mvhg_marginals.c
  clang: numpy/random/src/distributions/random_mvhg_count.c
  clang: numpy/random/src/distributions/random_hypergeometric.c
  ar: adding 5 object files to build/temp.macosx-13.4-arm64-3.6/libnpyrandom.a
  ranlib:@ build/temp.macosx-13.4-arm64-3.6/libnpyrandom.a
  running build_ext
  customize UnixCCompiler
  customize UnixCCompiler using new_build_ext
  building 'numpy.core._multiarray_tests' extension
  compiling C sources
  C compiler: 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

  creating build/temp.macosx-13.4-arm64-3.6/build/src.macosx-13.4-arm64-3.6/numpy/core/src/multiarray
  creating build/temp.macosx-13.4-arm64-3.6/numpy/core/src/common
  compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/user1/.pyenv/versions/3.6.15/include/python3.6m -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/common -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/npymath -c'
  clang: build/src.macosx-13.4-arm64-3.6/numpy/core/src/multiarray/_multiarray_tests.c
  clang: numpy/core/src/common/mem_overlap.c
  In file included from numpy/core/src/multiarray/_multiarray_tests.c.src:7:
  In file included from numpy/core/include/numpy/npy_math.h:596:
  numpy/core/src/npymath/npy_math_internal.h.src:490:21: warning: incompatible pointer types passing 'npy_longdouble *' (aka 'double *') to parameter of type 'long double *' [-Wincompatible-pointer-types]
      return modfl(x, iptr);
                      ^~~~
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:394:52: note: passing argument to parameter here
  extern long double modfl(long double, long double *);
                                                     ^
  numpy/core/src/multiarray/_multiarray_tests.c.src:1895:61: warning: format specifies type 'long double' but the argument has type 'npy_longdouble' (aka 'double') [-Wformat]
          PyOS_snprintf(str, sizeof(str), "%.*Lg", precision, x);
                                           ~~~~~              ^
                                           %.*g
  2 warnings generated.
  clang -bundle -undefined dynamic_lookup -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/openssl@3/lib -L/Users/user1/.pyenv/versions/3.6.15/lib -Wl,-rpath,/Users/user1/.pyenv/versions/3.6.15/lib -L/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/openssl@3/lib -L/Users/user1/.pyenv/versions/3.6.15/lib -Wl,-rpath,/Users/user1/.pyenv/versions/3.6.15/lib -L/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib build/temp.macosx-13.4-arm64-3.6/build/src.macosx-13.4-arm64-3.6/numpy/core/src/multiarray/_multiarray_tests.o build/temp.macosx-13.4-arm64-3.6/numpy/core/src/common/mem_overlap.o -L/Users/user1/.pyenv/versions/3.6.15/lib -Lbuild/temp.macosx-13.4-arm64-3.6 -lnpymath -o build/lib.macosx-13.4-arm64-3.6/numpy/core/_multiarray_tests.cpython-36m-darwin.so
  building 'numpy.core._multiarray_umath' extension
  compiling C sources
  C compiler: 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

  creating build/temp.macosx-13.4-arm64-3.6/numpy/core/src/multiarray
  creating build/temp.macosx-13.4-arm64-3.6/numpy/core/src/umath
  creating build/temp.macosx-13.4-arm64-3.6/build/src.macosx-13.4-arm64-3.6/numpy/core/src/umath
  creating build/temp.macosx-13.4-arm64-3.6/build/src.macosx-13.4-arm64-3.6/numpy/core/src/common
  creating build/temp.macosx-13.4-arm64-3.6/private
  creating build/temp.macosx-13.4-arm64-3.6/private/var
  creating build/temp.macosx-13.4-arm64-3.6/private/var/folders
  creating build/temp.macosx-13.4-arm64-3.6/private/var/folders/sm
  creating build/temp.macosx-13.4-arm64-3.6/private/var/folders/sm/906grd657hd0rc9std54b39w0000gn
  creating build/temp.macosx-13.4-arm64-3.6/private/var/folders/sm/906grd657hd0rc9std54b39w0000gn/T
  creating build/temp.macosx-13.4-arm64-3.6/private/var/folders/sm/906grd657hd0rc9std54b39w0000gn/T/pip-install-2mc8sdc8
  creating build/temp.macosx-13.4-arm64-3.6/private/var/folders/sm/906grd657hd0rc9std54b39w0000gn/T/pip-install-2mc8sdc8/numpy_e35df2512ab24c5382ec786ebe6e6e01
  creating build/temp.macosx-13.4-arm64-3.6/private/var/folders/sm/906grd657hd0rc9std54b39w0000gn/T/pip-install-2mc8sdc8/numpy_e35df2512ab24c5382ec786ebe6e6e01/numpy
  creating build/temp.macosx-13.4-arm64-3.6/private/var/folders/sm/906grd657hd0rc9std54b39w0000gn/T/pip-install-2mc8sdc8/numpy_e35df2512ab24c5382ec786ebe6e6e01/numpy/_build_utils
  creating build/temp.macosx-13.4-arm64-3.6/private/var/folders/sm/906grd657hd0rc9std54b39w0000gn/T/pip-install-2mc8sdc8/numpy_e35df2512ab24c5382ec786ebe6e6e01/numpy/_build_utils/src
  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-13.4-arm64-3.6/numpy/core/src/umath -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/npymath -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/user1/.pyenv/versions/3.6.15/include/python3.6m -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/common -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/npymath -c'
  extra options: '-faltivec -I/System/Library/Frameworks/vecLib.framework/Headers'
  clang: numpy/core/src/multiarray/alloc.c
  clang: numpy/core/src/multiarray/array_assign_scalar.c
  clang: numpy/core/src/multiarray/common.c
  clang: numpy/core/src/multiarray/datetime_strings.c
  clang: numpy/core/src/multiarray/descriptor.c
  clang: numpy/core/src/multiarray/buffer.c
  clang: numpy/core/src/multiarray/conversion_utils.c
  clang: build/src.macosx-13.4-arm64-3.6/numpy/core/src/multiarray/einsum.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: numpy/core/src/multiarray/hashdescr.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: build/src.macosx-13.4-arm64-3.6/numpy/core/src/multiarray/lowlevel_strided_loops.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: numpy/core/src/multiarray/multiarraymodule.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: numpy/core/src/multiarray/nditer_constr.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: numpy/core/src/multiarray/refcount.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: numpy/core/src/multiarray/scalarapi.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: numpy/core/src/multiarray/temp_elide.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: numpy/core/src/multiarray/vdot.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: build/src.macosx-13.4-arm64-3.6/numpy/core/src/umath/loops.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: numpy/core/src/umath/ufunc_object.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: numpy/core/src/umath/ufunc_type_resolution.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: build/src.macosx-13.4-arm64-3.6/numpy/core/src/npymath/ieee754.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
  clang: numpy/core/src/common/array_assign.c
  clang: numpy/core/src/common/ucsnarrow.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
  clang: build/src.macosx-13.4-arm64-3.6/numpy/core/src/common/npy_cpu_features.c
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  clang: /private/var/folders/sm/906grd657hd0rc9std54b39w0000gn/T/pip-install-2mc8sdc8/numpy_e35df2512ab24c5382ec786ebe6e6e01/numpy/_build_utils/src/apple_sgemv_fix.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
  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
  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
  clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
  Running from numpy source directory.
  /Users/user1/.pyenv/versions/3.6.15/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'define_macros'
    warnings.warn(msg)
  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 -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-13.4-arm64-3.6/numpy/core/src/umath -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/npymath -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/user1/.pyenv/versions/3.6.15/include/python3.6m -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/common -Ibuild/src.macosx-13.4-arm64-3.6/numpy/core/src/npymath -c numpy/core/src/multiarray/array_assign_scalar.c -o build/temp.macosx-13.4-arm64-3.6/numpy/core/src/multiarray/array_assign_scalar.o -MMD -MF build/temp.macosx-13.4-arm64-3.6/numpy/core/src/multiarray/array_assign_scalar.o.d -faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1
  ----------------------------------------
  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

cmssoen2

cmssoen21#

GitHub上的这条评论解决了我的问题:https://github.com/numpy/numpy/issues/17807#issuecomment-731014921

brew install openblas
OPENBLAS="$(brew --prefix openblas)" pip install numpy

字符串

相关问题