pyxDamerauLevenshtein: numpy.dtype error

I am using Python2.7 of ArcGIS 10.5 (cannot update python version). Installed pyxDamerauLevenshtein (1.5.3) and numpy 1.16.2 in a virtual environment as ArcGIS use numpy 1.9.3 for its core moudles. When I run, the script run under virtual environment but I got this error…

File "__init__.pxd", line 206, in init pyxdameraulevenshtein
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 56 from C header, got 52 from PyObject

_

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16

Most upvoted comments

I did not try to use it on ArcGIS after a few attempts. Instead I am using it as stand alone with geopandas to read spatial vector formats. I will try again on ArcGIS as I have upgraded to 10.7 and ArcGIS Pro.

To be clear, you shouldn’t actually need Cython. All Cython does is create the C file (pyxdameraulevenshtein.c) from the pyx source (pyxdameraulevenshtein.pyx). All you should need is a C compiler to compile the C file for Windows. I unfortunately don’t have experience doing this (all of my Python development occur on a Mac or Linux system). However, https://docs.python.org/3/extending/windows.html or https://wiki.python.org/moin/WindowsCompilers might be good places to help figure this out.

I’m glad you were able to get it working and that it’s not a problem on this project’s end.

Regarding how to enforce ArcGIS to use the right version of NumPy, I unfortunately can’t really help you because I don’t have ArcGIS to help with. Is there an ArcGIS forum you can post on to get help? What you really want is for ArcGIS to respect your local virtual environment.