Numpy won't install on pi3b Klipper

Basic Information:

Printer Model: ender 3
MCU / Printerboard: 4.2.7 + raspberry pi3b
klippy.log

hello guys, I’m not able to get numpy installed for measuring resonances… I’m no pro in Linux but I tried to activate the swap file like Klipper doc says but no way to get numpy installed. could you help please?

this command worked fine:
sudo apt install python3-numpy python3-matplotlib libatlas-base-dev

But this is what appears on my ssh screen when I try to install:

hitman@Ender:~ $ ~/klippy-env/bin/pip install -v numpy
Using pip 23.2.1 from /home/hitman/klippy-env/lib/python3.9/site-packages/pip (python 3.9)
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting numpy
  Using cached numpy-1.26.0.tar.gz (15.6 MB)
  Running command pip subprocess to install build dependencies
  Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
  Ignoring setuptools: markers 'python_version >= "3.12"' don't match your environment
  Ignoring colorama: markers 'os_name == "nt"' don't match your environment
  Collecting Cython<3.1,>=0.29.34
    Using cached https://www.piwheels.org/simple/cython/Cython-3.0.2-cp39-cp39-linux_armv7l.whl (10.7 MB)
  Collecting pyproject-metadata>=0.7.1
    Using cached https://www.piwheels.org/simple/pyproject-metadata/pyproject_metadata-0.7.1-py3-none-any.whl (7.4 kB)
  Collecting tomli>=1.0.0
    Using cached https://www.piwheels.org/simple/tomli/tomli-2.0.1-py3-none-any.whl (12 kB)
  Collecting packaging>=19.0 (from pyproject-metadata>=0.7.1)
    Using cached https://www.piwheels.org/simple/packaging/packaging-23.1-py3-none-any.whl (48 kB)
  Installing collected packages: tomli, packaging, Cython, pyproject-metadata
  Successfully installed Cython-3.0.2 packaging-23.1 pyproject-metadata-0.7.1 tomli-2.0.1
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  Getting requirements to build wheel ... done
  Running command pip subprocess to install backend dependencies
  Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
  Collecting ninja>=1.8.2
    Using cached https://www.piwheels.org/simple/ninja/ninja-1.11.1-cp39-cp39-linux_armv7l.whl (132 kB)
  Collecting patchelf>=0.11.0
    Using cached patchelf-0.17.2.1-py2.py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl (381 kB)
  Installing collected packages: patchelf, ninja
  Successfully installed ninja-1.11.1 patchelf-0.17.2.1
  Installing backend dependencies ... done
  Running command Preparing metadata (pyproject.toml)
  + /home/hitman/klippy-env/bin/python /tmp/pip-install-1k2loojo/numpy_ec71125a51df47d5b81c89fc1bf1d5ee/vendored-meson/meson/meson.py setup /tmp/pip-install-1k2loojo/numpy_ec71125a51df47d5b81c89fc1bf1d5ee /tmp/pip-install-1k2loojo/numpy_ec71125a51df47d5b81c89fc1bf1d5ee/.mesonpy-no0y9xnw/build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-1k2loojo/numpy_ec71125a51df47d5b81c89fc1bf1d5ee/.mesonpy-no0y9xnw/build/meson-python-native-file.ini
  The Meson build system
  Version: 1.2.99
  Source dir: /tmp/pip-install-1k2loojo/numpy_ec71125a51df47d5b81c89fc1bf1d5ee
  Build dir: /tmp/pip-install-1k2loojo/numpy_ec71125a51df47d5b81c89fc1bf1d5ee/.mesonpy-no0y9xnw/build
  Build type: native build
  Project name: NumPy
  Project version: 1.26.0
  C compiler for the host machine: cc (gcc 10.2.1 "cc (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110")
  C linker for the host machine: cc ld.bfd 2.35.2
  C++ compiler for the host machine: c++ (gcc 10.2.1 "c++ (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110")
  C++ linker for the host machine: c++ ld.bfd 2.35.2
  Cython compiler for the host machine: cython (cython 3.0.2)
  Host machine cpu family: arm
  Host machine cpu: armv7l
  Program python found: YES (/home/hitman/klippy-env/bin/python)
  Found pkg-config: /usr/bin/pkg-config (0.29.2)
  Run-time dependency python found: YES 3.9
  Has header "Python.h" with dependency python-3.9: YES
  Compiler for C supports arguments -fno-strict-aliasing: YES
  Message: During parsing cpu-dispatch: The following CPU features were ignored due to platform incompatibility or lack of support:
  "XOP FMA4"
  Test features "NEON" : Supported
  Test features "NEON_FP16" : Supported
  Test features "NEON_VFPV4" : Supported
  Test features "ASIMD" : Unsupported due to Compiler fails against the test code of "ASIMD"
  Test features "ASIMDHP" : Unsupported due to Implied feature "ASIMD" is not supported
  Test features "ASIMDFHM" : Unsupported due to Implied feature "ASIMD" is not supported
  Configuring npy_cpu_dispatch_config.h using configuration
  Message:
  CPU Optimization Options
    baseline:
      Requested : min
      Enabled   :
    dispatch:
      Requested : max -xop -fma4
      Enabled   : NEON NEON_FP16 NEON_VFPV4

  Library m found: YES
  Found CMake: /usr/bin/cmake (3.18.4)
  WARNING: CMake Toolchain: Failed to determine CMake compilers state
  Run-time dependency openblas found: NO (tried pkgconfig and cmake)
  Run-time dependency openblas found: NO (tried pkgconfig and cmake)

  ../../numpy/meson.build:207:4: ERROR: Problem encountered: No BLAS library detected! Install one, or use the `allow-noblas` build option (note, this may be up to 100x slower for some linear algebra operations).

  A full log can be found at /tmp/pip-install-1k2loojo/numpy_ec71125a51df47d5b81c89fc1bf1d5ee/.mesonpy-no0y9xnw/build/meson-logs/meson-log.txt
  error: subprocess-exited-with-error

  × Preparing metadata (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/hitman/klippy-env/bin/python /home/hitman/klippy-env/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpml64xmd_
  cwd: /tmp/pip-install-1k2loojo/numpy_ec71125a51df47d5b81c89fc1bf1d5ee
  Preparing metadata (pyproject.toml) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
1 Like

Try:

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

7 Likes

Thank you so much! numpy 1.25.2 installed successfully!

1 Like

For future reference:

  • v1.2.6 is brand new and no wheels are available
  • Once available, this problem should solve itself
1 Like

Life saver!

Thank you very much! I have spent four days trying to install numpy in my pi4 in vain. How cool it is!

I’m having a similar issue where numpy won’t install on a pi3b / buster. Python version 2.7.16

~/klippy-env/bin/pip install -v numpy==1.25.2
Using pip 23.2.1 from /home/pi/klippy-env/lib/python3.7/site-packages/pip (python 3.7)
Looking in indexes: Simple index, piwheels - Simple index
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/50/e1/9b0c184f04b8cf5f3c941ffa56fbcbe936888bdac9aa7ba6bae405ac752b/numpy-1.22.0.zip (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/0a/c8/a62767a6b374a0dfb02d2a0456e5f56a372cdd1689dbc6ffb6bf1ddedbc0/numpy-1.22.1.zip (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/e9/6c/c0a8130fe198f27bab92f1b28631e0cc2572295f6b7a31e87efe7448aa1c/numpy-1.22.2.zip (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/64/4a/b008d1f8a7b9f5206ecf70a53f84e654707e7616a771d84c05151a4713e9/numpy-1.22.3.zip (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/f6/d8/ab692a75f584d13c6542c3994f75def5bce52ded9399f52e230fe402819d/numpy-1.22.4.zip (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/33/ad/fc5e3fd1077622b2b32fc3fd36176b36475b63da486eb5578d7f8fb2af29/numpy-1.23.0rc1.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/7b/bc/05e61801a3689f81c8569c057c61fd1d302e989be5c96f6ce7acee46250a/numpy-1.23.0rc2.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/a2/bf/1502d20b4a7f5d5f74c5242748834aaf8cd6ff7cb40b7c64ef58ba47a751/numpy-1.23.0rc3.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/03/c6/14a17e10813b8db20d1e800ff9a3a898e65d25f2b0e9d6a94616f1e3362c/numpy-1.23.0.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/13/b1/0c22aa7ca1deda4915cdec9562f839546bb252eecf6ad596eaec0592bd35/numpy-1.23.1.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/f4/66/17b8e95770478436bf968353c89683ce6f9e14d92e0d4fb3111c09ba18d2/numpy-1.23.2.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/0a/88/f4f0c7a982efdf7bf22f283acf6009b29a9cc5835b684a49f8d3a4adb22f/numpy-1.23.3.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/64/8e/9929b64e146d240507edaac2185cd5516f00b133be5b39250d253be25a64/numpy-1.23.4.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/42/38/775b43da55fa7473015eddc9a819571517d9a271a9f8134f68fb9be2f212/numpy-1.23.5.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/8a/b0/bb59e52e4eb90a42fbff1a90d57c45265fa3133c533e67842757068fc731/numpy-1.24.0rc1.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/da/d9/f27cf8e76b9bb015802cb347f208a32383299fd5e30965735a82a92902ae/numpy-1.24.0rc2.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/5f/c7/5ca7c100dcc85b5ef1b176bdf87be5e4392c2c3018e13cc7cdef828c6a09/numpy-1.24.0.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/ce/b8/c170db50ec49d5845bd771bc5549fe734ee73083c5c52791915f95d8e2bc/numpy-1.24.1.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/e4/a9/6704bb5e1d1d778d3a6ee1278a8d8134f0db160e09d52863a24edb58eab5/numpy-1.24.2.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/2c/d4/590ae7df5044465cc9fa2db152ae12468694d62d952b1528ecff328ef7fc/numpy-1.24.3.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.8’): https://files.pythonhosted.org/packages/a4/9b/027bec52c633f6556dba6b722d9a0befb40498b9ceddd29cbe67a45a127c/numpy-1.24.4.tar.gz (from Links for numpy) (requires-python:>=3.8)
Link requires a different Python (3.7.3 not in: ‘>=3.9’): https://files.pythonhosted.org/packages/26/de/437a60a69f7fd0c79264530a97787b2ac7394616e3661236201518f8a47d/numpy-1.25.0rc1.tar.gz (from Links for numpy) (requires-python:>=3.9)
Link requires a different Python (3.7.3 not in: ‘>=3.9’): https://files.pythonhosted.org/packages/d0/b2/fe774844d1857804cc884bba67bec38f649c99d0dc1ee7cbbf1da601357c/numpy-1.25.0.tar.gz (from Links for numpy) (requires-python:>=3.9)
Link requires a different Python (3.7.3 not in: ‘>=3.9’): https://files.pythonhosted.org/packages/cf/7a/f68d1d658a0e68084097beb212fa9356fee7eabff8b57231cc4acb555b12/numpy-1.25.1.tar.gz (from Links for numpy) (requires-python:>=3.9)
Link requires a different Python (3.7.3 not in: ‘>=3.9’): https://files.pythonhosted.org/packages/a0/41/8f53eff8e969dd8576ddfb45e7ed315407d27c7518ae49418be8ed532b07/numpy-1.25.2.tar.gz (from Links for numpy) (requires-python:>=3.9)
Link requires a different Python (3.7.3 not in: ‘<3.13,>=3.9’): https://files.pythonhosted.org/packages/29/5e/5887b95aa544a977d21f4adbc5b052897c0e730aa6408ed9903aece7f18f/numpy-1.26.0b1.tar.gz (from Links for numpy) (requires-python:<3.13,>=3.9)
Link requires a different Python (3.7.3 not in: ‘<3.13,>=3.9’): https://files.pythonhosted.org/packages/33/a9/1233954ed69e96e829e6615a6e4a68e8c99d599661edff756fb4300c9a0b/numpy-1.26.0rc1.tar.gz (from Links for numpy) (requires-python:<3.13,>=3.9)
Link requires a different Python (3.7.3 not in: ‘<3.13,>=3.9’): https://files.pythonhosted.org/packages/55/b3/b13bce39ba82b7398c06d10446f5ffd5c07db39b09bd37370dc720c7951c/numpy-1.26.0.tar.gz (from Links for numpy) (requires-python:<3.13,>=3.9)
ERROR: Ignored the following versions that require a different python version: 1.22.0 Requires-Python >=3.8; 1.22.1 Requires-Python >=3.8; 1.22.2 Requires-Python >=3.8; 1.22.3 Requires-Python >=3.8; 1.22.4 Requires-Python >=3.8; 1.23.0 Requires-Python >=3.8; 1.23.0rc1 Requires-Python >=3.8; 1.23.0rc2 Requires-Python >=3.8; 1.23.0rc3 Requires-Python >=3.8; 1.23.1 Requires-Python >=3.8; 1.23.2 Requires-Python >=3.8; 1.23.3 Requires-Python >=3.8; 1.23.4 Requires-Python >=3.8; 1.23.5 Requires-Python >=3.8; 1.24.0 Requires-Python >=3.8; 1.24.0rc1 Requires-Python >=3.8; 1.24.0rc2 Requires-Python >=3.8; 1.24.1 Requires-Python >=3.8; 1.24.2 Requires-Python >=3.8; 1.24.3 Requires-Python >=3.8; 1.24.4 Requires-Python >=3.8; 1.25.0 Requires-Python >=3.9; 1.25.0rc1 Requires-Python >=3.9; 1.25.1 Requires-Python >=3.9; 1.25.2 Requires-Python >=3.9; 1.26.0 Requires-Python <3.13,>=3.9; 1.26.0b1 Requires-Python <3.13,>=3.9; 1.26.0rc1 Requires-Python <3.13,>=3.9
ERROR: Could not find a version that satisfies the requirement numpy==1.25.2 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6)
ERROR: No matching distribution found for numpy==1.25.2

If I run just ~/klippy-env/bin/pip install -v numpy, it works for several minutes then errors.

This is on 3 separate pi 3b+s

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/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpydc22k9u
cwd: /tmp/pip-install-giz8bmsr/numpy_365f24d08000431abf53d277f2595348
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

My issue was resolved with ~/klippy-env/bin/pip3 install -v numpy==1.18

python 2.7? you need to update your Python to 3.7 (or latest), then install numpy 1.25.2

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.