Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
9.32k stars 5.28k forks source link

doc: Add required dependency to run numpy with python3 on RPI #6491

Closed brujoand closed 7 months ago

brujoand commented 7 months ago

When installing klipper using python3, I hit an issue when setting up numpy. Following the provided documentation leads to the following error when running TEST_RESONANCES AXIS=X

Failed to import numpy module, make sure it was installed via ~/klippy-env/bin/pip install (refer to docs/Measuring_Resonances.md for more details).

Attempting to import numpy through the virtualenv leads to the error:

~/klippy-env/bin/python3
Python 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "/home/brujoand/klippy-env/lib/python3.9/site-packages/numpy/core/__init__.py", line 24, in <module>
    from . import multiarray
  File "/home/brujoand/klippy-env/lib/python3.9/site-packages/numpy/core/multiarray.py", line 10, in <module>
    from . import overrides
  File "/home/brujoand/klippy-env/lib/python3.9/site-packages/numpy/core/overrides.py", line 8, in <module>
    from numpy.core._multiarray_umath import (
ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

Further down is a link to the documentation which instructs the user to install the missing package. Ref: https://numpy.org/devdocs/user/troubleshooting-importerror.html

I noticed a lot of discussions on reddit regarding this issue where users are guided to downgrade to python2. By adding this additional package all resonance testing worked as expected on my RPI 2b.

Sineos commented 7 months ago

Nice one. 👍

Please also provide the signed off as per point 3 in "What to expect in a review" in master/docs/CONTRIBUTING.md

brujoand commented 7 months ago

Aye, Just made this quick PR from my couch laptop in the Github UI. Will fix once I'm back up with a proper laptop (with ssh keys etc)

Sineos commented 7 months ago

libopenblas-base not libobenblas-base (sorry, typo above in the first comment is upon me)

brujoand commented 7 months ago

No worries, I'm just glad it's not only me :P

KevinOConnor commented 7 months ago

Thanks.

-Kevin