dw-0 / kiauh

Klipper Installation And Update Helper
GNU General Public License v3.0
3.39k stars 488 forks source link

Install of numpy into klippy-env fails with KIAUH installed Klipper #232

Closed bjarchi closed 1 year ago

bjarchi commented 2 years ago

Linux Distribution

Linux octopi 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux

What happened

Following instructions here: Klipper: measuring resonances

At the step where numpy is installed into the klippy venv: ~/klippy-env/bin/pip install -v numpy (or pip install numpy with venv activated), numpy wheel compilation fails with an internal compilation error:

(full output attached as file)

...
  arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_unary_fp.dispatch.neon.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_arithmetic.dispatch.neon.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_unary_fp.dispatch.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_arithm_fp.dispatch.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_arithmetic.dispatch.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_trigonometric.dispatch.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_exponent_log.dispatch.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_trigonometric.dispatch.neon_vfpv4.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/abstractdtypes.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/alloc.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/arrayobject.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/arraytypes.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/array_coercion.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/array_method.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/array_assign_scalar.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/array_assign_array.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/arrayfunction_override.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/buffer.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/calculation.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/compiled_base.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/common.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/common_dtype.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/convert.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/convert_datatype.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/conversion_utils.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/ctors.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/datetime.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/datetime_strings.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/datetime_busday.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/datetime_busdaycal.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/descriptor.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/dtypemeta.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/dragon4.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/dtype_transfer.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/einsum.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/einsum_sumprod.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/flagsobject.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/getset.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/hashdescr.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/item_selection.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/iterators.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/legacy_dtype_implementation.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/lowlevel_strided_loops.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/mapping.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/methods.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/multiarraymodule.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/nditer_templ.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/nditer_api.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/nditer_constr.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/nditer_pywrap.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/number.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/refcount.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/sequence.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/shape.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/scalarapi.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/scalartypes.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/strfuncs.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/temp_elide.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/typeinfo.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/usertypes.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/vdot.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/quicksort.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/mergesort.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/timsort.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/heapsort.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/radixsort.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/selection.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/binsearch.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/umathmodule.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/reduction.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/matmul.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/clip.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/ufunc_object.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/extobj.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/scalarmath.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/ufunc_type_resolution.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/override.o build/temp.linux-armv7l-3.7/numpy/core/src/common/array_assign.o build/temp.linux-armv7l-3.7/numpy/core/src/common/mem_overlap.o build/temp.linux-armv7l-3.7/numpy/core/src/common/npy_argparse.o build/temp.linux-armv7l-3.7/numpy/core/src/common/npy_longdouble.o build/temp.linux-armv7l-3.7/numpy/core/src/common/ucsnarrow.o build/temp.linux-armv7l-3.7/numpy/core/src/common/ufunc_override.o build/temp.linux-armv7l-3.7/numpy/core/src/common/numpyos.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/common/npy_cpu_features.o build/temp.linux-armv7l-3.7/numpy/core/src/common/cblasfuncs.o build/temp.linux-armv7l-3.7/numpy/core/src/common/python_xerbla.o -L/usr/lib/arm-linux-gnueabihf -L/usr/lib -Lbuild/temp.linux-armv7l-3.7 -lnpymath -lf77blas -lcblas -latlas -lf77blas -lcblas -lm -o build/lib.linux-armv7l-3.7/numpy/core/_multiarray_umath.cpython-37m-arm-linux-gnueabihf.so
  during RTL pass: expand
  numpy/core/src/umath/loops_trigonometric.dispatch.c.src: In function ‘FLOAT_sin_NEON_VFPV4’:
  numpy/core/src/umath/loops_trigonometric.dispatch.c.src:202:20: internal compiler error: in convert_move, at expr.c:218
   NPY_NO_EXPORT void NPY_CPU_DISPATCH_CURFX(FLOAT_@func@)
                      ^
  0xb6b50717 __libc_start_main
        /build/glibc-Ir6W4B/glibc-2.28/csu/libc-start.c:308
  Please submit a full bug report,
  with preprocessed source if appropriate.
  Please include the complete backtrace with any bug report.
  See <file:///usr/share/doc/gcc-8/README.Bugs> for instructions.
  lto-wrapper: fatal error: arm-linux-gnueabihf-gcc returned 1 exit status
  compilation terminated.
  /usr/bin/ld: error: lto-wrapper failed
  collect2: error: ld returned 1 exit status
  Running from numpy source directory.
  Warning: attempted relative import with no known parent package
  /tmp/pip-build-env-yonffob7/overlay/lib/python3.7/site-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
    warnings.warn(msg)

  ########### EXT COMPILER OPTIMIZATION ###########
  Platform      :
    Architecture: armhf
    Compiler    : gcc

  CPU baseline  :
    Requested   : 'min'
    Enabled     : none
    Flags       : none
    Extra checks: none

  CPU dispatch  :
    Requested   : 'max -xop -fma4'
    Enabled     : NEON NEON_FP16 NEON_VFPV4 ASIMD ASIMDHP ASIMDDP ASIMDFHM
    Generated   :
                :
    NEON        :
    Flags       : -mfpu=neon
    Extra checks: none
    Detect      : NEON
                : build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_unary_fp.dispatch.c
                : build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_arithmetic.dispatch.c
                :
    NEON_VFPV4  : NEON NEON_FP16
    Flags       : -mfp16-format=ieee -mfpu=neon-vfpv4
    Extra checks: none
    Detect      : NEON NEON_FP16 NEON_VFPV4
                : build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_trigonometric.dispatch.c
  CCompilerOpt.cache_flush[809] : write cache to path -> /tmp/pip-install-3t_4j_j1/numpy_b88b992c7f9c4f2a8c50ef19da2e31a3/build/temp.linux-armv7l-3.7/ccompiler_opt_cache_ext.py

  ########### CLIB COMPILER OPTIMIZATION ###########
  Platform      :
    Architecture: armhf
    Compiler    : gcc

  CPU baseline  :
    Requested   : 'min'
    Enabled     : none
    Flags       : none
    Extra checks: none

  CPU dispatch  :
    Requested   : 'max -xop -fma4'
    Enabled     : NEON NEON_FP16 NEON_VFPV4 ASIMD ASIMDHP ASIMDDP ASIMDFHM
    Generated   : none
  CCompilerOpt.cache_flush[809] : write cache to path -> /tmp/pip-install-3t_4j_j1/numpy_b88b992c7f9c4f2a8c50ef19da2e31a3/build/temp.linux-armv7l-3.7/ccompiler_opt_cache_clib.py
  error: Command "arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_unary_fp.dispatch.neon.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_arithmetic.dispatch.neon.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_unary_fp.dispatch.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_arithm_fp.dispatch.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_arithmetic.dispatch.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_trigonometric.dispatch.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_exponent_log.dispatch.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops_trigonometric.dispatch.neon_vfpv4.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/abstractdtypes.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/alloc.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/arrayobject.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/arraytypes.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/array_coercion.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/array_method.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/array_assign_scalar.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/array_assign_array.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/arrayfunction_override.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/buffer.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/calculation.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/compiled_base.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/common.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/common_dtype.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/convert.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/convert_datatype.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/conversion_utils.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/ctors.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/datetime.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/datetime_strings.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/datetime_busday.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/datetime_busdaycal.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/descriptor.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/dtypemeta.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/dragon4.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/dtype_transfer.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/einsum.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/einsum_sumprod.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/flagsobject.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/getset.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/hashdescr.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/item_selection.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/iterators.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/legacy_dtype_implementation.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/lowlevel_strided_loops.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/mapping.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/methods.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/multiarraymodule.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/nditer_templ.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/nditer_api.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/nditer_constr.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/nditer_pywrap.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/number.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/refcount.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/sequence.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/shape.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/scalarapi.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/multiarray/scalartypes.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/strfuncs.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/temp_elide.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/typeinfo.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/usertypes.o build/temp.linux-armv7l-3.7/numpy/core/src/multiarray/vdot.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/quicksort.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/mergesort.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/timsort.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/heapsort.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/radixsort.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/selection.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/npysort/binsearch.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/umathmodule.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/reduction.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/loops.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/matmul.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/clip.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/ufunc_object.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/extobj.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/umath/scalarmath.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/ufunc_type_resolution.o build/temp.linux-armv7l-3.7/numpy/core/src/umath/override.o build/temp.linux-armv7l-3.7/numpy/core/src/common/array_assign.o build/temp.linux-armv7l-3.7/numpy/core/src/common/mem_overlap.o build/temp.linux-armv7l-3.7/numpy/core/src/common/npy_argparse.o build/temp.linux-armv7l-3.7/numpy/core/src/common/npy_longdouble.o build/temp.linux-armv7l-3.7/numpy/core/src/common/ucsnarrow.o build/temp.linux-armv7l-3.7/numpy/core/src/common/ufunc_override.o build/temp.linux-armv7l-3.7/numpy/core/src/common/numpyos.o build/temp.linux-armv7l-3.7/build/src.linux-armv7l-3.7/numpy/core/src/common/npy_cpu_features.o build/temp.linux-armv7l-3.7/numpy/core/src/common/cblasfuncs.o build/temp.linux-armv7l-3.7/numpy/core/src/common/python_xerbla.o -L/usr/lib/arm-linux-gnueabihf -L/usr/lib -Lbuild/temp.linux-armv7l-3.7 -lnpymath -lf77blas -lcblas -latlas -lf77blas -lcblas -lm -o build/lib.linux-armv7l-3.7/numpy/core/_multiarray_umath.cpython-37m-arm-linux-gnueabihf.so" failed with exit status 1
  error: subprocess-exited-with-error

  × Building wheel for numpy (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/pi/klippy-env/bin/python3 /home/pi/klippy-env/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpbmegt2fd
  cwd: /tmp/pip-install-3t_4j_j1/numpy_b88b992c7f9c4f2a8c50ef19da2e31a3
  Building wheel for numpy (pyproject.toml) ... error
  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

These are instructions I previously followed, successfully, with externally installed Klipper; the only thing that has changed since the previous (successful) attempt is uninstalling external klipper and reinstalling through KIAUH. I reinstalled the three requisite APT packages after first seeing this error, and rebooted the pi; neither helped.

I'm not sure if I got the following python version warnings at the beginning of the (file) pip output when I did this before; they're just matching numpy version to installed python version.

tmp-klippy_env_numpy_fail.txt

What did you expect to happen

Expected numpy to build and install successfully in the venv, as it did previously with Klipper installed via process from klipper docs.

How to reproduce

I haven't tried this from a completely clean octopi install; I will do so when I'm able to back up my current SD card and tolerate some downtime.

Additional information

I'm open to the suggestion that starting from a clean install might be best at this point, especially given the ease of backing up octoprint.

I am surprised that Buster is still using Python 3.7; else there would be a pre-built wheel most likely. Are there better base OS options with more up-to-date system?

bjarchi commented 2 years ago

Update: Some more research suggests this may be a more general numpy error related to gcc version, possibly due to moving from a pi3b to a pi4b between installs:

see numpy issue here

bjarchi commented 2 years ago

Further update:

Temporary workaround is to constrain numpy install in venv to a version with a wheel on piwheels; see this comment which amounts to editing /etc/pip.conf and /etc/pip-constraints.txt to ensure usage of piwheels, enable pip constraints, and constrain numpy to version(s) present in piwheels for Buster:

pip.conf

[global]
extra-index-url=https://www.piwheels.org/simple/

[install]
constraint=/etc/pip-constraints.txt

pip-constraints.txt

numpy<1.21.5; python_version=='3.7'

Leaving this issue open for now as information; feel free to close if appropriate.

franco443 commented 3 months ago

this worked for me for the bigtreetech adxl345:

sudo apt update sudo apt install python3-numpy python3-matplotlib libatlas-base-dev libopenblas-dev

~/klippy-env/bin/pip install -v numpy

jlt24 commented 1 month ago

I know this is really old but somehow I had this error today. I have a newer install via kiauh. I follow the klipper documentation to get the setup but this failed. What I ended up doing is running python from here ~/klippy-env/bin/python and then trying import numpy. It failed with unknown module (or whatever) . So I just installed like this. ~/klippy-env/bin/python -m install numpy

and that worked.