Failure with numpy 1.18.4
See original GitHub issueWe’re experiencing a bug with pyxDamerauLevenshtein
1.5.3 (any version above, and including, 1.5.2, really), when using it with numpy
1.18.4 (or any version between 1.18.4 and 1.20.0).
Here’s how to reproduce (using docker):
docker run --rm -ti python:3.7.6 bash
pip install numpy==1.18.4
pip install pyxdameraulevenshtein==1.5.3
python -c 'from pyxdameraulevenshtein import damerau_levenshtein_distance'
This will produce the following error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "__init__.pxd", line 242, in init pyxdameraulevenshtein
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
This was working fine until at least last Friday, but started failing without any change on our part.
I’m not sure if anything can be done (seems pretty hard to debug), but if someone has the same issue, upgrading numpy
to 1.20.0+ or downgrading pyxDamerauLevenshtein
to 1.5.1 works.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
Top Results From Across the Web
Failure with numpy 1.18.4 · Issue #28
We're experiencing a bug with pyxDamerauLevenshtein 1.5.3 (any version above, and including, 1.5.2, really), when using it with numpy 1.18.4 (or ...
Read more >NumPy 1.18.4 Release Notes
This is the last planned release in the 1.18.x series. It reverts the bool("0") behavior introduced in 1.18.3 and fixes a bug in...
Read more >Unexpected Error while install numpy 1.18.5
I am trying to install NumPy version 1.18.4 using having pip on windows 11 but it ends with the following error: Pyton version:...
Read more >numpy 1.18.4
It provides: a powerful N-dimensional array object. sophisticated (broadcasting) functions. tools for integrating C/C++ and Fortran code.
Read more >[Solution]-Unexpected Error while install numpy 1.18.5-numpy
I am trying to install NumPy version 1.18.4 using having pip on windows 11 but it ends with the following error: Pyton version:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The weird thing is that it happened all of a sudden, without anything related (versions of python, numpy or pyxdameraulevenshtein) changing. The only thing I can think of is the system packages (build-essential, git, curl, unzip, in our debian-based docker image).
I can only speak for our case: numpy is required by many libraries we use, so having to upgrade it is a pretty big risk. Having one less library depending on numpy lower both the risk of having to upgrade numpy and the risk of breakages when we do have to upgrade numpy.
Thank you, @gfairchild 👍🏻 , especially for your responsiveness!
I tested with the reproduction steps above (without installing numpy first), and by running our unit test: everything seems ok.
We can close this issue!