Python Script on Startup:: ValueError:numpy.ndarray size changed, may indicate binary incompatibility. Expected 48 from C header, got 40 from PyObject
After a rigorous search, I got some hints from this accepted answer. I checked my cronlog file and followed the python import
attempt until the error had occurred. The error had occurred just after import Interval attempt. Therefore, I installed the numpy
as follows:
sudo pip install --upgrade numpy Interval
It solved my problem. Everything works fine after the reboot.
ValueError: numpy.ndarray size changed, may indicate binary incompatibility
I got some additional insight into the issue by consulting this GitHub issue page. As it turns out, if the size from the PyObject is smaller than the size from the C header, an upgrade of the package referenced by the error (here numpy
) is necessary to resolve the error, and vice versa.
I was able to resolve the issue by upgrading numpy
to version 1.20.0
, even though the requirement was numpy<1.19.0
.
Related Topics
Python Requests - No Connection Adapters
Dangers of Sys.Setdefaultencoding('Utf-8')
Can't Get Argparse to Read Quoted String with Dashes in It
Efficiently Return the Index of the First Value Satisfying Condition in Array
How to Convert a String Date into Datetime Format in Python
Saving a Figure After Invoking Pyplot.Show() Results in an Empty File
What Is the G Object in This Flask Code
How to Pipe a Subprocess Call to a Text File
Why in Numpy 'Nan == Nan' Is False While Nan in [Nan] Is True
How to Clone a Django Model Instance Object and Save It to the Database
Problems with Pip Install Numpy - Runtimeerror: Broken Toolchain: Cannot Link a Simple C Program
Find Length of Sequences of Identical Values in a Numpy Array (Run Length Encoding)
Matching Nested Structures with Regular Expressions in Python