Closed bjarchi closed 1 year 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:
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.
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
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.
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
(orpip install numpy
with venv activated), numpy wheel compilation fails with an internal compilation error:(full output attached as file)
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.
sudo apt install python3-numpy python3-matplotlib libatlas-base-dev
~/klippy-env/bin/pip install -v numpy
source klippy-env/bin/activate
thenpip install -v numpy
)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?