python-sigma icon indicating copy to clipboard operation
python-sigma copied to clipboard

python-levenshtein install errors on windows

Open idnahacks opened this issue 3 years ago • 2 comments

I'm trying the install on a Windows box and running into errors with python-levenshtein.

At first it's complaining that I don't have the C++ build tools installed, which I didn't, but after installing them I get the error: "Cannot open include file: 'io.h': No such file or directory."

I'm now trying a full visual studio install to see if that resolves it.

idnahacks avatar Feb 10 '22 10:02 idnahacks

I managed to get this installed by installing the following pre-reqs:

  • Visual C++ Build Tools core features
  • MSVC v142 - VS 2019 C++ x64/x86 build tools
  • C++ 2019 redistributable package
  • Windows 10 SDK

idnahacks avatar Feb 10 '22 11:02 idnahacks

I have no Windows development box, but python-Levenshtein is not strictly required. The sigma used to require fuzzywuzzy with the speedup extra, which used python-Levenshtein because it was a natively compiled package which provides a speed improvement.

Looking into the packages a bit, fuzzywuzzy has been superseded by thefuzz, and I don't think the speedup extra is really necessary here for our purposes (we only use it to fuzzy-match command line arguments which are very short strings). With that in mind, I've removed the requirement for the speedup extra, which in turn removes the requirement for python-Levenshtein.

I don't believe there are any other natively-compiled requirements at this point, so it should in theory install on Windows now as long as Python is setup properly. ~~However, as I mentioned, I have no Windows development machine and don't have any intention of maintaining one. Development on Windows is hell and not generally fruitful. lol~~ In hindsight, I think that came across saltier than I wanted it to. Just a joke :stuck_out_tongue: I'm happy to make using this easier regardless of your environment, but I do not use Windows on the day-to-day and it's not the direct target of the project, haha.

calebstewart avatar Feb 15 '22 02:02 calebstewart