I made a python program for my Raspberry Pi a while back and it uses my sense hat and motion sensor both connect via gpio by using a TriGpio expansion board and it worked for a while until recently when my power surged during a storm and my pi was on during it. When I booted it back up I went to start the script like normal and I got this error:

Traceback (most recent call last): File "/home/pi/motion.py", line 2, in <module> from sense_hat import SenseHat File "/usr/lib/python3/dist-packages/sense_hat/__init__.py", line 2, in <module> from .sense_hat import SenseHat, SenseHat as AstroPi File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 7, in <module> import numpy as np File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 153, in <module> from . import add_newdocs File "/usr/lib/python3/dist-packages/numpy/add_newdocs.py", line 13, in <module> from numpy.lib import add_newdoc File "/usr/lib/python3/dist-packages/numpy/lib/__init__.py", line 18, in <module> from .polynomial import * File "/usr/lib/python3/dist-packages/numpy/lib/polynomial.py", line 19, in <module> from numpy.linalg import eigvals, lstsq, inv File "/usr/lib/python3/dist-packages/numpy/linalg/__init__.py", line 50, in <module> from .linalg import * File "/usr/lib/python3/dist-packages/numpy/linalg/linalg.py", line 29, in <module> from numpy.linalg import lapack_lite, _umath_linalg ImportError: /usr/lib/liblapack.so.3: undefined symbol: spotf2_spftrf_

Can anyone help me fix this without possibly reformatting my sd card?

  • 1
    Looks like one or more packages that numpy depends on (or numpy itself) are corrupt. You can try reinstalling them with with sudo apt-get install --reinstall python3-numpy liblapack3 libblas3 – Dave Jones May 9 '17 at 14:19
  • Can you post it as an answer as to help more people? – Quintin VanBooven May 10 '17 at 12:52
  • My suggestion was based on what had corrupted on your system (the fact it was in liblapack.so.3 also meant I just happened to be able to guess what packages needed re-installing), which is something quite specific to your scenario. I'd suggest, instead it'd be more useful to link to more general means of detecting and correcting corrupt packages. – Dave Jones May 11 '17 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.