0

On a fresh install of Raspbian 10 on Raspberry PI 3 B+, I am trying to install with Python 3.7 the numpy==1.19.5. The problem is that when I import pandas, I get this error:

pi@raspberrypi:~ $ python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pi/.local/lib/python3.7/site-packages/pandas/__init__.py", line 29, in <module>
    from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib
  File "/home/pi/.local/lib/python3.7/site-packages/pandas/_libs/__init__.py", line 13, in <module>
    from pandas._libs.interval import Interval
  File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 44 from C header, got 40 from PyObject

If I keep the default installation of numpy==1.20.2, it works perfectly, but I have a requirement for any numpy version less than 1.20. I've tried some versions of pandas, but nothing works. I've hit a dead-end so I am asking here for help.

bkbilly
  • 193
  • 1
  • 15
  • So this sort of error can be confusing to sort out... but generally comes down to how you're installing the packages. This is not necessarily pandas-specific, so searching for your error message will return some useful links. e.g., https://stackoverflow.com/a/66743692/9357244 https://github.com/scikit-image/scikit-image/issues/5270 I think that providing some more info on how you're installing packages may help (pip? anaconda? from source?). – chris Apr 21 '21 at 17:20
  • I've already looked into this topic you suggested, but it says to upgrade numpy to 1.20 which is not suited in my case. I installed everything with pip3 which is at it's latest version (21.0.1). – bkbilly Apr 21 '21 at 19:34

0 Answers0